diff options
Diffstat (limited to 'winsup/cygwin/winsup.h')
-rw-r--r-- | winsup/cygwin/winsup.h | 87 |
1 files changed, 1 insertions, 86 deletions
diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h index db30441..be151e7 100644 --- a/winsup/cygwin/winsup.h +++ b/winsup/cygwin/winsup.h @@ -107,17 +107,12 @@ extern int dynamically_loaded; #define __CONDSETF(n, what, x, prefix) \ ((n) ? __SETF (what, x, prefix) : __CLEARF (what, x, prefix)) -#include "thread.h" #include "shared.h" extern HANDLE hMainThread; extern HANDLE hMainProc; #include "debug.h" -#include "sync.h" -#include "sigproc.h" -#include "fhandler.h" -#include "path.h" #include <sys/cygwin.h> /********************** Application Interface **************************/ @@ -155,84 +150,6 @@ extern host_dependent_constants host_dependent; /* Events/mutexes */ extern HANDLE title_mutex; -/*************************** Per Thread ******************************/ - -#define PER_THREAD_FORK_CLEAR ((void *)0xffffffff) -class per_thread -{ - DWORD tls; - int clear_on_fork_p; -public: - per_thread (int forkval = 1) {tls = TlsAlloc (); clear_on_fork_p = forkval;} - DWORD get_tls () {return tls;} - int clear_on_fork () {return clear_on_fork_p;} - - virtual void *get () {return TlsGetValue (get_tls ());} - virtual size_t size () {return 0;} - virtual void set (void *s = NULL); - virtual void set (int n) {TlsSetValue (get_tls (), (void *)n);} - virtual void *create () - { - void *s = new char [size ()]; - memset (s, 0, size ()); - set (s); - return s; - } -}; - -class per_thread_waitq : public per_thread -{ -public: - per_thread_waitq () : per_thread (0) {} - void *get () {return (waitq *) this->per_thread::get ();} - void *create () {return (waitq *) this->per_thread::create ();} - size_t size () {return sizeof (waitq);} -}; - -struct vfork_save -{ - int pid; - jmp_buf j; - DWORD frame[100]; - char **vfork_ebp; - char **vfork_esp; - int is_active () { return pid < 0; } -}; - -class per_thread_vfork : public per_thread -{ -public: - vfork_save *val () { return (vfork_save *) this->per_thread::get (); } - vfork_save *create () {return (vfork_save *) this->per_thread::create ();} - size_t size () {return sizeof (vfork_save);} -}; - -extern "C" { -struct signal_dispatch -{ - int arg; - void (*func) (int); - int sig; - int saved_errno; - DWORD oldmask; - DWORD retaddr; - DWORD *retaddr_on_stack; -}; -}; - -struct per_thread_signal_dispatch : public per_thread -{ - signal_dispatch *get () { return (signal_dispatch *) this->per_thread::get (); } - signal_dispatch *create () {return (signal_dispatch *) this->per_thread::create ();} - size_t size () {return sizeof (signal_dispatch);} -}; - -extern per_thread_waitq waitq_storage; -extern per_thread_vfork vfork_storage; -extern per_thread_signal_dispatch signal_dispatch_storage; - -extern per_thread *threadstuff[]; - /**************************** Convenience ******************************/ #define NO_COPY __attribute__((section(".data_cygwin_nocopy"))) @@ -316,9 +233,6 @@ extern int cygwin_finished_initializing; /**************************** Miscellaneous ******************************/ -const char * __stdcall find_exec (const char *name, path_conv& buf, const char *winenv = "PATH=", - int null_if_notfound = 0, const char **known_suffix = NULL); - /* File manipulation */ int __stdcall set_process_privileges (); int __stdcall get_file_attribute (int, const char *, int *, @@ -349,6 +263,7 @@ extern "C" int _spawnve (HANDLE hToken, int mode, const char *path, extern void __stdcall exec_fixup_after_fork (); +class _pinfo; /* For mmaps across fork(). */ int __stdcall recreate_mmaps_after_fork (void *); void __stdcall set_child_mmap_ptr (_pinfo *); |