EINVAL error when call pthread_attr_setstacksize
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=XjytcqF1Z8HCrX6pwdrfd7wSx9bGDAZcoNFAL8GxMxSG2YeEOeHj2boq8Qd0YUg9DfSetQFa4TNC2sftfvCeCZpadaJAuiMr6ITqF3/xmogCYyZmxcZRu1u2E2Eo/jhvXcK7n8G7MV1N1Bzyd9kuiLJkoybv/T2YxltotPEu6cs=; Hello! I am trying to set thread stack size attribute. My code is stacksize = (PTHREAD_STACK_MIN); res = pthread_attr_setstacksize(&tattr, stacksize); if(res != 0) { printf("Failed to set thread stack size due to: %s\n", strerror(res)); return false; } However, I always got EINVAL error. I read the man page and some posts on the mailing list and knew that the stack size has to be a multiple of 4KB (4096). I tried but I just always got EINVAL error. Here is my system information 8.10.1 Darwin Kernel Version 8.10.1: Wed May 23 16:33:00 PDT 2007; root:xnu-792.22.5~1/RELEASE_I386 i386 i386 Any idea why? Thank you in advance. Heidi ____________________________________________________________________________________ Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more. http://mobile.yahoo.com/go?refer=1GNXIC _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Heidi Zhou