Re: gthread-win32.c



Sebastian Wilhelmi wrote:

Hi Kaz, Dan, Steven and all interested parties.

We now have a native thread implementation for win32. Everything was quite
straightforward once I got used to the different calling conventions in
windows (Argh....!). The only challange were the condition varibales. They are
modelled after what Kaz proposed, I think it's called "Explicit Notification".
Using GArrays instead of GLists they should be quite efficient....

Please have a look to avoid any loopholes in this implementation.

http://cvs.gnome.org/bonsai/cvsblame.cgi?file=glib/gthread/gthread-win32.c

Thanks,
Sebastian


227 g_mutex_unlock (entered_mutex);
228
229 win32_check_for_error (WAIT_FAILED !=
230 (retval = WaitForSingleObject (event, milliseconds)));
231
232 wilhelmi 1.1 g_mutex_lock (entered_mutex);


Lines 227-230 should be ObjectSignalAndWait, if supported.

Line 232: the mutex is relocked even if the wait times out.

Steven





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]