e576bb | 2002-10-11 | Martin Nilsson | | |
1cbb89 | 2011-04-25 | Martin Stjernholm | | || $Id$
|
e576bb | 2002-10-11 | Martin Nilsson | | */
|
1b10db | 2002-10-08 | Martin Nilsson | |
|
07513e | 1996-10-04 | Fredrik Hübinette (Hubbe) | | #ifndef THREADS_H
#define THREADS_H
#include "machine.h"
|
a7fef4 | 1997-09-03 | Per Hedbor | | #include "object.h"
|
b2d3e4 | 2000-12-01 | Fredrik Hübinette (Hubbe) | | #include "pike_error.h"
|
5923b1 | 2000-07-06 | Fredrik Hübinette (Hubbe) | | #include "interpret.h"
|
45637c | 2001-04-07 | Fredrik Hübinette (Hubbe) | | #include "pike_threadlib.h"
|
d978c0 | 2000-02-04 | Henrik Grubbström (Grubba) | |
|
f3c715 | 2001-04-14 | Fredrik Hübinette (Hubbe) | | #ifdef PIKE_THREADS
|
c91f89 | 2000-04-19 | Martin Stjernholm | |
|
07513e | 1996-10-04 | Fredrik Hübinette (Hubbe) | | struct svalue;
|
421801 | 1999-01-31 | Fredrik Hübinette (Hubbe) | | struct pike_frame;
|
07513e | 1996-10-04 | Fredrik Hübinette (Hubbe) | |
|
0542ef | 1999-11-17 | Fredrik Hübinette (Hubbe) | | extern PIKE_MUTEX_T interleave_lock;
|
a91ca0 | 1998-07-10 | Henrik Grubbström (Grubba) | |
|
574088 | 1998-01-01 | Fredrik Hübinette (Hubbe) | | #define THREAD_NOT_STARTED -1
#define THREAD_RUNNING 0
#define THREAD_EXITED 1
|
5923b1 | 2000-07-06 | Fredrik Hübinette (Hubbe) | | struct thread_state {
struct Pike_interpreter state;
char swapped;
char status;
COND_T status_change;
THREAD_T id;
struct mapping *thread_local;
struct thread_state *hashlink, **backlink;
|
b377d7 | 2000-07-07 | Henrik Grubbström (Grubba) | | #ifdef PROFILING
|
0877a8 | 2001-08-29 | Martin Stjernholm | | #if SIZEOF_LONG_LONG - 0 != 0
|
b377d7 | 2000-07-07 | Henrik Grubbström (Grubba) | | long long time_base;
|
0877a8 | 2001-08-29 | Martin Stjernholm | | #else
long time_base;
#endif
|
b377d7 | 2000-07-07 | Henrik Grubbström (Grubba) | | #endif /* PROFILING */
|
5923b1 | 2000-07-06 | Fredrik Hübinette (Hubbe) | | };
|
e13200 | 1998-11-19 | Fredrik Hübinette (Hubbe) | |
|
db40ab | 1999-04-15 | Fredrik Hübinette (Hubbe) | |
|
07513e | 1996-10-04 | Fredrik Hübinette (Hubbe) | |
|
6e4c64 | 2002-09-11 | Marcus Comstedt | | int low_nt_create_thread(unsigned stack_size,
|
cd67ac | 1999-05-11 | Fredrik Hübinette (Hubbe) | | unsigned (TH_STDCALL *func)(void *),
void *arg,
unsigned *id);
|
6d1a5e | 1996-10-07 | Fredrik Hübinette (Hubbe) | | struct thread_starter;
|
cd67ac | 1999-05-11 | Fredrik Hübinette (Hubbe) | | struct thread_local;
void low_init_threads_disable(void);
void init_threads_disable(struct object *o);
void exit_threads_disable(struct object *o);
void init_interleave_mutex(IMUTEX_T *im);
void exit_interleave_mutex(IMUTEX_T *im);
void thread_table_init(void);
unsigned INT32 thread_table_hash(THREAD_T *tid);
|
d6896c | 2000-12-16 | Marcus Comstedt | | PMOD_EXPORT void thread_table_insert(struct object *o);
PMOD_EXPORT void thread_table_delete(struct object *o);
PMOD_EXPORT struct thread_state *thread_state_for_id(THREAD_T tid);
PMOD_EXPORT struct object *thread_for_id(THREAD_T tid);
PMOD_EXPORT void f_all_threads(INT32 args);
PMOD_EXPORT int count_pike_threads(void);
|
26cd94 | 1999-05-07 | Fredrik Hübinette (Hubbe) | | TH_RETURN_TYPE new_thread_func(void * data);
|
07513e | 1996-10-04 | Fredrik Hübinette (Hubbe) | | void f_thread_create(INT32 args);
|
dc7cc9 | 1998-01-14 | Fredrik Hübinette (Hubbe) | | void f_thread_set_concurrency(INT32 args);
|
d6896c | 2000-12-16 | Marcus Comstedt | | PMOD_EXPORT void f_this_thread(INT32 args);
|
6d1a5e | 1996-10-07 | Fredrik Hübinette (Hubbe) | | struct mutex_storage;
struct key_storage;
|
07513e | 1996-10-04 | Fredrik Hübinette (Hubbe) | | void f_mutex_lock(INT32 args);
void f_mutex_trylock(INT32 args);
void init_mutex_obj(struct object *o);
void exit_mutex_obj(struct object *o);
void init_mutex_key_obj(struct object *o);
void exit_mutex_key_obj(struct object *o);
void f_cond_wait(INT32 args);
void f_cond_signal(INT32 args);
void f_cond_broadcast(INT32 args);
void init_cond_obj(struct object *o);
void exit_cond_obj(struct object *o);
|
dc7cc9 | 1998-01-14 | Fredrik Hübinette (Hubbe) | | void f_thread_backtrace(INT32 args);
void f_thread_id_status(INT32 args);
void init_thread_obj(struct object *o);
void exit_thread_obj(struct object *o);
|
d6896c | 2000-12-16 | Marcus Comstedt | | PMOD_EXPORT void f_thread_local(INT32 args);
|
cd67ac | 1999-05-11 | Fredrik Hübinette (Hubbe) | | void f_thread_local_get(INT32 args);
void f_thread_local_set(INT32 args);
|
a91ca0 | 1998-07-10 | Henrik Grubbström (Grubba) | | void low_th_init(void);
|
cd67ac | 1999-05-11 | Fredrik Hübinette (Hubbe) | | void th_init(void);
|
be478c | 1997-08-30 | Henrik Grubbström (Grubba) | | void th_cleanup(void);
|
cd67ac | 1999-05-11 | Fredrik Hübinette (Hubbe) | | int th_num_idle_farmers(void);
|
99a5a6 | 2000-08-06 | David Hedbor | | int th_num_farmers(void);
|
d6896c | 2000-12-16 | Marcus Comstedt | | PMOD_EXPORT void th_farm(void (*fun)(void *), void *here);
|
07513e | 1996-10-04 | Fredrik Hübinette (Hubbe) | |
|
d3015d | 2000-04-18 | Jonas Wallden | | #endif
|
ec2bab | 2000-06-24 | Fredrik Hübinette (Hubbe) | |
#include "interpret.h"
|
d3015d | 2000-04-18 | Jonas Wallden | |
|
5377b9 | 1997-02-01 | Henrik Grubbström (Grubba) | | #endif /* THREADS_H */
|