[Pcsclite-git-commit] [PCSC] 01/01: ThreadCreate(): fix stack size on Solaris

Ludovic Rousseau rousseau at moszumanska.debian.org
Fri Jun 17 20:23:56 UTC 2016


This is an automated email from the git hooks/post-receive script.

rousseau pushed a commit to branch master
in repository PCSC.

commit e78449ce37f453516e46d78ad0b99e01db32727b
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date:   Fri Jun 17 22:21:01 2016 +0200

    ThreadCreate(): fix stack size on Solaris
    
    A stack_size of 0 indicates the default size on Solaris.
    The default size is 2 MB so more than 256 KB. Do not shrink it.
    
    Thanks to Ivo Raisr for the bug report.
---
 src/utils.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/utils.c b/src/utils.c
index 2619a48..7b4e761 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -168,7 +168,9 @@ int ThreadCreate(pthread_t * pthThread, int attributes,
 	if (ret)
 		goto error;
 
-	if (stack_size < 0x40000)
+	/* A stack_size of 0 indicates the default size on Solaris.
+	 * The default size is more than 256 KB so do not shrink it. */
+	if ((stack_size != 0) && (stack_size < 0x40000))
 	{
 		stack_size = 0x40000;
 		ret = pthread_attr_setstacksize(&attr, stack_size);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pcsclite/PCSC.git



More information about the Pcsclite-cvs-commit mailing list