This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- WaitForSingleObject(mutex->mutex, INFINITE);
+#ifdef SILC_THREADS
+ if (mutex) {
+ EnterCriticalSection(&mutex->mutex);
+ assert(mutex->locked == FALSE);
+ mutex->locked = TRUE;
+ }
+#endif /* SILC_THREADS */