aboutsummaryrefslogtreecommitdiff
path: root/libjava/win32-threads.cc
AgeCommit message (Collapse)AuthorFilesLines
2002-02-25win32-threads.cc (_Jv_ThreadInitData): _Jv_Malloc instead of newAdam Megacz1-2/+2
2002-02-24 Adam Megacz <adam@xwt.org> * win32-threads.cc (_Jv_ThreadInitData): _Jv_Malloc instead of new * win32-threads.cc (_Jv_ThreadDestroyData): _Jv_Free instead of delete From-SVN: r50014
2002-02-07natThrowable.cc: Updated copyright.Tom Tromey1-1/+1
* java/lang/natThrowable.cc: Updated copyright. * java/io/natFileWin32.cc: Updated copyright. * java/io/natFileDescriptorWin32.cc: Updated copyright. * win32-threads.cc: Updated copyright. * name-finder.cc: Updated copyright. * include/name-finder.h: Updated copyright. From-SVN: r49586
2002-02-05win32-threads.cc: #undef STRICT after gc.h inclusionAdam Megacz1-0/+2
2002-02-04 Adam Megacz <adam@xwt.org> * win32-threads.cc: #undef STRICT after gc.h inclusion From-SVN: r49506
2002-02-022002-02-01 Adam MegaczAdam Megacz1-31/+77
* win32-threads.cc: (_Jv_CondWait, _Jv_CondNotify, _Jv_CondNotifyAll): Corrected wait() algorithm to make it safe. (ensure_condvar_initialized, _Jv_CondInit, _Jv_CondDestroy): Added lazy creation of Win32 Events for better performance (really_start): This now uses GC_CreateThread so boehm-gc knows about new threads even when statically linked. From-SVN: r49428
2001-05-21Implement invocation interface; don't create new thread for main.Per Bothner1-6/+19
From-SVN: r42428
2000-12-30For boehm-gc:Bryce McKinlay1-7/+10
* configure.in: Rename THREADLIB to THREADLIBS. * Makefile.am (LINK): Add $(THREADLIBS) to libtool command line. This ensures that we link the correct version of the linuxthreads semaphore functions. * Makefile.in: Rebuilt. * configure: Rebuilt. * linux_thread.c (GC_thr_init, GC_suspend_handler): Add SIGABRT to the list of signals which are not blocked during suspend in the NO_SIGNALS case. For libjava: * Makefile.am (libgcj_la_LIBADD): Add $(THREADLIBS). This ensures that the correct versions of various linuxthreads functions get linked. * Makefile.in: Rebuilt. * java/lang/natThread.cc (finalize_native): New static function. Call _Jv_ThreadDestroyData. (initialize_native): Register finalizer for "data". * include/posix-threads.h (_Jv_ThreadInitData): New simpler prototype. (_Jv_ThreadDestroyData): New prototype. * include/win32-threads.h: Ditto. * include/no-threads.h: Ditto. * posix-threads.cc (_Jv_ThreadInitData): Implement new prototype. (_Jv_ThreadDestroyData): New function. Free native thread "data" and move mutex and condition variable destroy code from: (really_start): ...here. (_Jv_ThreadStart): Set PTHREAD_CREATE_DETACHED. * win32-threads.cc (_Jv_ThreadInitData): Implement new prototype. (_Jv_ThreadDestroyData): Implemented. * nogc.cc (_Jv_AllocObject): Use "void *" not "ptr_t". (_Jv_AllocArray): Ditto. From-SVN: r38557
2000-03-28Makefile.in: New #defines and friends for Thread.h.Bryce McKinlay1-3/+3
* Makefile.in: New #defines and friends for Thread.h. * posix-threads.cc: (struct starter): Remove `object'. (_Jv_CondWait): Use interruptable condition variables and new recursive mutexes. New return codes on interrupt or non-ownership of mutex. (_Jv_CondNotify): Ditto. (_Jv_CondNotifyAll): Ditto. (_Jv_ThreadInterrupt): Set thread interrupt flag directly. Interrupt the target thread by signaling its wait condition. (_Jv_ThreadInitData): Set `thread_obj' in the thread data struct, not the starter struct. Initialize wait_mutex and wait_cond. (_Jv_MutexLock): New recursive mutex implementation. Moved from posix-threads.h. (_Jv_MutexUnlock): Ditto. (really_start): Set info->data->thread from pthread_self() to work around a race condition. Destroy wait_mutex and wait_cond when run() returns. * java/lang/Thread.java: (isInterrupted_): Renamed to overloaded `isInterrupted(boolean)'. Clear interrupted flag if clear_flag is set. startable_flag: New private field. (Thread): Initialize `startable_flag'. (toString): Check for null thread group. * java/lang/natThread.cc: (struct natThread): New fields `join_mutex', `join_cond'. Removed fields `joiner', `next'. (class locker): Removed. (initialize_native): Initialize `join_cond' and `join_mutex'. (interrupt): Now just calls _Jv_ThreadInterrupt(). (join): Simplified. Just wait on the target thread's join condition. (finish_): Remove join list code. Unset thread group. Signal potential joiners by notifying the dying threads join_cond. (start): Check for illegal restarts. * java/lang/natObject.cc: Check for return value of _Jv_CondWait and act appropriatly. * include/posix-threads.h: Remove all HAVE_RECURSIVE_MUTEX related #defines and #ifdefs. (struct _Jv_Thread_t): New fields `thread_obj', `wait_cond', `wait_mutex', `next'. (struct _Jv_ConditionVariable_t): Define as a struct instead of directly mapping to pthread_cond_t. (struct _Jv_Mutex_t): New recursive implementation. (_Jv_PthreadCheckMonitor): Reimplemented. Simple `owner' check. _Jv_HaveCondDestroy: Never define this for posix-threads. (_Jv_CondNotify): Remove inline implementation(s), prototype instead. (_Jv_CondNotifyAll): Ditto. (_Jv_MutexLock): Ditto. (_Jv_MutexUnlock): Ditto. (_Jv_MutexInit): Changed to reflect new mutex implementation. (_Jv_MutexDestroy): Ditto. (_Jv_CondDestroy): Removed. (_Jv_PthreadGetMutex): Removed. * include/win32-threads.h: (_Jv_CondNotify): Guess _JV_NOT_OWNER on an error. Add a FIXME about this. (_Jv_CondNotifyAll): Ditto. * win32-threads.cc: (_Jv_CondWait): Return 0 on a timeout. Guess _JV_NOT_OWNER on other errors. Add FIXME. From-SVN: r32773
2000-03-15[multiple changes]Tom Tromey1-0/+247
2000-03-15 Tom Tromey <tromey@cygnus.com> * java/io/natFileDescriptorWin32.cc (winerr): Now static. * prims.cc (win32_exception_handler): Reformatted. * include/win32-threads.h (_Jv_HaveCondDestroy): New define. (_Jv_HaveMutexDestroy): Likewise. 2000-03-15 Jon Beniston <jb7216@bristol.ac.uk> * java/io/natFileDescriptorWin32.cc: New file. * java/io/natFileWin32.cc: New file. * java/net/natInetAddress.cc: Added conditional inclusion of Windows / Winsock headers. * java/net/natPlainDatagramSocketImpl.cc: Added conditional inclusion of Windows / Winsock headers. * java/net/natPlainSocketImpl.cc: Added conditional inclusion of Windows / Winsock headers. * include/win32-signal.h: New file. * include/win32-threads.h: New file. * win32-threads.cc: New file. * exception.cc (win32_get_restart_frame): New function. * prims.cc (win32_exception_handler): New function. (main_init) Performs Winsock initialisation. (main_init) Installs exeception handler. From-SVN: r32567