* dcrt0.cc (dll_crt0_1): Initialize mainthread stuff here before anything needs

it.
* sigproc.cc (sigproc_init): Move mainthread initialization out of here.
* sigproc.h (sigthread): Add init() method.
(sigframe): Don't try to initialize muto.
* sync.cc: Undef WaitForSingleObject to avoid recursion.
This commit is contained in:
Christopher Faylor
2000-05-18 03:20:01 +00:00
parent 2dc173fe91
commit 12e659efa8
5 changed files with 22 additions and 6 deletions

View File

@ -40,6 +40,11 @@ struct sigthread
DWORD frame;
muto *lock;
sigthread () : id (0), frame (0), lock (0) {}
void init (const char *s)
{
lock = new_muto (FALSE, s);
id = GetCurrentThreadId ();
}
};
class sigframe
@ -50,8 +55,6 @@ private:
public:
void set (sigthread &t, int up = 1)
{
if (!t.lock)
t.lock = new_muto (FALSE, "sigthread");
t.lock->acquire ();
st = &t;
t.frame = (DWORD) (up ? __builtin_frame_address (1) :