]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/threads.h
Opt: Introduced contexts
[libucw.git] / ucw / threads.h
index 7f100b20b2dc79882fb11a4f03250022f560a44b..3c1f29b799ccf292e44ae38df900d23e5fe67326 100644 (file)
@@ -1,14 +1,16 @@
 /*
  *     The UCW Library -- Threading Helpers
  *
- *     (c) 2006--2010 Martin Mares <mj@ucw.cz>
+ *     (c) 2006--2012 Martin Mares <mj@ucw.cz>
  *
  *     This software may be freely distributed and used according to the terms
  *     of the GNU Lesser General Public License.
  */
 
-#ifndef _UCW_THREAD_H
-#define _UCW_THREAD_H
+#ifndef _UCW_THREADS_H
+#define _UCW_THREADS_H
+
+#include <ucw/sighandler.h>
 
 /* This structure holds per-thread data */
 
@@ -17,6 +19,12 @@ struct ucwlib_context {
   int temp_counter;                    // Counter for fb-temp.c
   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
+  struct trans *current_trans;         // Currently open transaction
 };
 
 #ifdef CONFIG_UCW_THREADS