diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | build.bat | 2 | ||||
-rw-r--r-- | buildlib.bat | 20 | ||||
-rw-r--r-- | tsd.c | 4 |
4 files changed, 32 insertions, 2 deletions
@@ -1,3 +1,11 @@ +Sun Dec 6 21:54:35 1998 Ross Johnson <rpj@ixobrychus.canberra.edu.au> + + * build.bat: New DOS script to compile and link a pthreads app + using Microsoft's CL compiler linker. + * buildlib.bat: New DOS script to compile all the object files + and create pthread.lib and pthread.dll using Microsoft's CL + compiler linker. + 1998-12-05 Anders Norlander <anorland@hem2.passagen.se> * implement.h (_pthread_try_enter_critical_section): New extern diff --git a/build.bat b/build.bat new file mode 100644 index 0000000..449d6e2 --- /dev/null +++ b/build.bat @@ -0,0 +1,2 @@ +cl /W3 /MT /nologo /Yd /Zi -I. -D_WIN32_WINNT=0x400 -DSTDCALL=_stdcall -c %1.c +cl /Feaout.exe /Zi %1.obj pthread.lib diff --git a/buildlib.bat b/buildlib.bat new file mode 100644 index 0000000..e1005f0 --- /dev/null +++ b/buildlib.bat @@ -0,0 +1,20 @@ +del *.obj + +cl /W3 /MT /nologo /Yd /Zi -I. -D_WIN32_WINNT=0x400 -DSTDCALL=_stdcall -c attr.c +cl /W3 /MT /nologo /Yd /Zi -I. -D_WIN32_WINNT=0x400 -DSTDCALL=_stdcall -c cancel.c +cl /W3 /MT /nologo /Yd /Zi -I. -D_WIN32_WINNT=0x400 -DSTDCALL=_stdcall -c cleanup.c +cl /W3 /MT /nologo /Yd /Zi -I. -D_WIN32_WINNT=0x400 -DSTDCALL=_stdcall -c condvar.c +cl /W3 /MT /nologo /Yd /Zi -I. -D_WIN32_WINNT=0x400 -DSTDCALL=_stdcall -c create.c +cl /W3 /MT /nologo /Yd /Zi -I. -D_WIN32_WINNT=0x400 -DSTDCALL=_stdcall -c dll.c +cl /W3 /MT /nologo /Yd /Zi -I. -D_WIN32_WINNT=0x400 -DSTDCALL=_stdcall -c exit.c +cl /W3 /MT /nologo /Yd /Zi -I. -D_WIN32_WINNT=0x400 -DSTDCALL=_stdcall -c fork.c +cl /W3 /MT /nologo /Yd /Zi -I. -D_WIN32_WINNT=0x400 -DSTDCALL=_stdcall -c global.c +cl /W3 /MT /nologo /Yd /Zi -I. -D_WIN32_WINNT=0x400 -DSTDCALL=_stdcall -c misc.c +cl /W3 /MT /nologo /Yd /Zi -I. -D_WIN32_WINNT=0x400 -DSTDCALL=_stdcall -c mutex.c +cl /W3 /MT /nologo /Yd /Zi -I. -D_WIN32_WINNT=0x400 -DSTDCALL=_stdcall -c private.c +cl /W3 /MT /nologo /Yd /Zi -I. -D_WIN32_WINNT=0x400 -DSTDCALL=_stdcall -c sched.c +cl /W3 /MT /nologo /Yd /Zi -I. -D_WIN32_WINNT=0x400 -DSTDCALL=_stdcall -c signal.c +cl /W3 /MT /nologo /Yd /Zi -I. -D_WIN32_WINNT=0x400 -DSTDCALL=_stdcall -c sync.c +cl /W3 /MT /nologo /Yd /Zi -I. -D_WIN32_WINNT=0x400 -DSTDCALL=_stdcall -c tsd.c + +cl /LD /Zi *.obj /Fe$@ /link /nodefaultlib:libcmt /implib:pthread.lib msvcrt.lib /def:pthread.def @@ -62,14 +62,14 @@ pthread_key_create(pthread_key_t *key, void (*destructor)(void *)) /* CRITICAL SECTION */ pthread_mutex_lock(&_pthread_tsd_mutex); - if (_pthread_tsd_key_next >= PTHREAD_KEYS_MAX) + if (_pthread_key_virgin_next >= PTHREAD_KEYS_MAX) ret = EAGAIN; /* FIXME: This needs to be implemented as a list plus a re-use stack as for thread IDs. _pthread_destructor_run_all() then needs to be changed to push keys onto the re-use stack. */ - k = _pthread_tsd_key_next++; + k = _pthread_key_virgin_next++; _pthread_tsd_key_table[k].in_use = 0; _pthread_tsd_key_table[k].status = _PTHREAD_TSD_KEY_INUSE; |