pike.git / src / threads.h

version» Context lines:

pike.git/src/threads.h:1:   /* -  * $Id: threads.h,v 1.64 1999/04/07 23:10:12 hubbe Exp $ +  * $Id: threads.h,v 1.65 1999/04/15 19:12:51 hubbe Exp $    */   #ifndef THREADS_H   #define THREADS_H      #include "machine.h"   #include "interpret.h"   #include "object.h"   #include "error.h"   #ifdef HAVE_SYS_TYPES_H   /* Needed for pthread_t on OSF/1 */
pike.git/src/threads.h:483:    (unsigned int)_tmp_uid->thread_id, live_threads)); \    co_broadcast(&live_threads_change); \    while (threads_disabled) { \    THREADS_FPRINTF(1, (stderr, "THREADS_DISALLOW_UID(): Wait...\n")); \    co_wait(&threads_disabled_change, &interpreter_lock); \    } \    SWAP_IN_THREAD(_tmp_uid);\    } \    } while(0)    + #define SWAP_IN_THREAD_IF_REQUIRED() do { \ +  struct thread_state *_tmp=thread_state_for_id(th_self()); \ +  HIDE_GLOBAL_VARIABLES(); \ +  THREADS_DISALLOW() +  + #ifdef PIKE_DEBUG + #define ASSERT_THREAD_SWAPPED_IN() do { \ +  struct thread_state *_tmp=thread_state_for_id(th_self()); \ +  if(_tmp->swapped) fatal("Thread is not swapped in!\n"); \ +  }while(0) +  + #else + #define ASSERT_THREAD_SWAPPED_IN() + #endif +    /* Prototypes begin here */   struct thread_starter;   void *new_thread_func(void * data);   void f_thread_create(INT32 args);   void f_thread_set_concurrency(INT32 args);   void f_this_thread(INT32 args);   struct mutex_storage;   struct key_storage;   void f_mutex_lock(INT32 args);   void f_mutex_trylock(INT32 args);
pike.git/src/threads.h:543:   #define mt_init(X)   #define mt_lock(X)   #define mt_unlock(X)   #define mt_destroy(X)   #define THREADS_ALLOW()   #define THREADS_DISALLOW()   #define THREADS_ALLOW_UID()   #define THREADS_DISALLOW_UID()   #define HIDE_GLOBAL_VARIABLES()   #define REVEAL_GLOBAL_VARIABLES() + #define ASSERT_THREAD_SWAPPED_IN() + #define SWAP_IN_THREAD_IF_REQUIRED()   #define th_init()   #define low_th_init()   #define th_cleanup()   #define th_init_programs()   #define th_self() ((void*)0)   #define co_signal(X)   #define co_broadcast(X)      #define low_init_threads_disable()   #define init_threads_disable(X)