[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xs: set read_thread stacksize
On Tuesday 29 May 2012 20:39:33 Ian Campbell wrote: > ...and if it were then autoconf is the way to figure that out now, > unless _POSIX_THREAD_ATTR_STACKSIZE is specified somewhere (which I > doubt). I was following the recommendation of the POSIX Threads: Semi-FAQ which states 5.2 How can I determine if a system supports the Stack Attribute(s)? If the header file unistd.h defines the symbolic constant _POSIX_THREAD_ATTR_STACKSIZE to a value greater than 0, the implementation should support the getting and setting of the Stack Size Attribute. If it defined to a value of 200112L then the current specification is supported. If this needs to be done via autoconf let me know. > Also if it is only pthread_attr_setstacksize which is optional, rather > than pthread_attr_* generally, then the #if could be pulled into just > surround that call, presuming there is no harm in a "NULL" attr. I don't quite get you, do you mean only protect the actual pthread_attr_setstacksize() call with #ifdef and therefore always call pthread_attr_init()? > > > + pthread_attr_t attr; > > > + > > > + if (pthread_attr_init(&attr) != 0) { > > > + mutex_unlock(&h->request_mutex); > > > + return false; > > > + } > > > + if (pthread_attr_setstacksize(&attr, 16 * 1024) != 0) { > > > > #define for this value? > > Yes, please. Will do, Simon -- [1] http://www.cognitus.net/html/howto/pthreadSemiFAQ_5.html#s5_1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |