good for commit regards -steve On Tue, 2009-03-24 at 17:21 +0100, Jim Meyering wrote: > From bed3c7b729b6088adab6eb8e8f587be8a07e0884 Mon Sep 17 00:00:00 2001 > From: Jim Meyering <[email protected]> > Date: Tue, 24 Mar 2009 17:20:40 +0100 > Subject: [PATCH] factor an #ifdef and a little duplication "up" out of a > function > > * exec/coroipcs.c (STACK_SIZE): Define. > (req_setup_recv): Use it, rather than an in-function #ifdef. > --- > exec/coroipcs.c | 18 ++++++++++-------- > 1 files changed, 10 insertions(+), 8 deletions(-) > > diff --git a/exec/coroipcs.c b/exec/coroipcs.c > index afdc274..7d58c6c 100644 > --- a/exec/coroipcs.c > +++ b/exec/coroipcs.c > @@ -81,6 +81,15 @@ > #define MSG_SEND_LOCKED 0 > #define MSG_SEND_UNLOCKED 1 > > +/* > + * IA64 needs more stack space then other arches > + */ > +#ifdef __ia64__ > +# define STACK_SIZE 400000 > +#else > +# define STACK_SIZE 200000 > +#endif > + > static struct coroipcs_init_state *api; > > DECLARE_LIST_INIT (conn_info_list_head); > @@ -1004,14 +1013,7 @@ int coroipcs_handler_dispatch ( > api->init_fn_get (conn_info->service) (conn_info); > > pthread_attr_init (&conn_info->thread_attr); > - /* > - * IA64 needs more stack space then other arches > - */ > - #if defined(__ia64__) > - pthread_attr_setstacksize (&conn_info->thread_attr, 400000); > - #else > - pthread_attr_setstacksize (&conn_info->thread_attr, 200000); > - #endif > + pthread_attr_setstacksize (&conn_info->thread_attr, STACK_SIZE); > > pthread_attr_setdetachstate (&conn_info->thread_attr, > PTHREAD_CREATE_JOINABLE); > res = pthread_create (&conn_info->thread, > -- > 1.6.2.rc1.285.gc5f54 > _______________________________________________ > Openais mailing list > [email protected] > https://lists.linux-foundation.org/mailman/listinfo/openais
_______________________________________________ Openais mailing list [email protected] https://lists.linux-foundation.org/mailman/listinfo/openais
