X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=inline;f=ucw%2Fthreads.h;h=3796abf57afd399c3bdf7639705c79918f55658b;hb=bc5f818d21b7aceaf2c0e263b00aa4295211d8f9;hp=8b225beeb656212519ab353e44e8893e4168e878;hpb=ba1c173f544383aa6553a75dee6e6858d8f243a4;p=libucw.git diff --git a/ucw/threads.h b/ucw/threads.h index 8b225bee..3796abf5 100644 --- a/ucw/threads.h +++ b/ucw/threads.h @@ -1,7 +1,7 @@ /* * The UCW Library -- Threading Helpers * - * (c) 2006--2011 Martin Mares + * (c) 2006--2012 Martin Mares * * This software may be freely distributed and used according to the terms * of the GNU Lesser General Public License. @@ -10,7 +10,7 @@ #ifndef _UCW_THREADS_H #define _UCW_THREADS_H -#include "ucw/sighandler.h" +#include /* This structure holds per-thread data */ @@ -20,6 +20,7 @@ struct ucwlib_context { struct asio_queue *io_queue; // Async I/O queue for fb-direct.c ucw_sighandler_t *signal_handlers; // Signal handlers for sighandler.c struct main_context *main_context; // Current context for mainloop.c + struct cf_context *cf_context; // Current context for configuration parser // Resources and transactions: struct respool *current_respool; // Current resource pool struct mempool *trans_pool; // Transaction mempool @@ -42,14 +43,14 @@ static inline int ucwlib_thread_id(struct ucwlib_context *c) { return c->_thread void ucwlib_lock(void); void ucwlib_unlock(void); -extern uns ucwlib_thread_stack_size; +extern uint ucwlib_thread_stack_size; #else /* We have no threads, let's simulate the context and locking */ -extern struct ucwlib_context default_ucwlib_context; -static inline struct ucwlib_context *ucwlib_thread_context(void) { return &default_ucwlib_context; } +extern struct ucwlib_context ucwlib_default_context; +static inline struct ucwlib_context *ucwlib_thread_context(void) { return &ucwlib_default_context; } static inline int ucwlib_thread_id(struct ucwlib_context *c UNUSED) { return 0; }