diff options
Diffstat (limited to 'innobase/os/os0sync.c')
-rw-r--r-- | innobase/os/os0sync.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/innobase/os/os0sync.c b/innobase/os/os0sync.c index 9f9b2605884..4c283431575 100644 --- a/innobase/os/os0sync.c +++ b/innobase/os/os0sync.c @@ -19,14 +19,14 @@ Created 9/6/1995 Heikki Tuuri #include "ut0mem.h" /* Type definition for an operating system mutex struct */ -struct os_mutex_struct{ +struct os_mutex_struct{ void* handle; /* OS handle to mutex */ ulint count; /* we use this counter to check that the same thread does not recursively lock the mutex: we do not assume that the OS mutex supports recursive locking, though - NT seems to do that */ + NT seems to do that */ }; /************************************************************* @@ -44,7 +44,7 @@ os_event_create( { #ifdef __WIN__ HANDLE event; - + event = CreateEvent(NULL, /* No security attributes */ TRUE, /* Manual reset */ FALSE, /* Initial state nonsignaled */ @@ -108,7 +108,7 @@ os_event_set( /*=========*/ os_event_t event) /* in: event to set */ { -#ifdef __WIN__ +#ifdef __WIN__ ut_a(event); ut_a(SetEvent(event)); #else @@ -124,7 +124,7 @@ os_event_set( } os_fast_mutex_unlock(&(event->os_mutex)); -#endif +#endif } /************************************************************** @@ -162,7 +162,7 @@ void os_event_free( /*==========*/ os_event_t event) /* in: event to free */ - + { #ifdef __WIN__ ut_a(event); @@ -238,7 +238,7 @@ os_event_wait_time( } else { err = WaitForSingleObject(event, INFINITE); } - + if (err == WAIT_OBJECT_0) { return(0); @@ -250,7 +250,7 @@ os_event_wait_time( } #else UT_NOT_USED(time); - + /* In Posix this is just an ordinary, infinite wait */ os_event_wait(event); @@ -290,7 +290,7 @@ os_event_wait_multiple( return(index - WAIT_OBJECT_0); #else ut_a(n == 0); - + /* In Posix we can only wait for a single event */ os_event_wait(*event_array); @@ -331,7 +331,7 @@ os_mutex_create( os_mutex_t mutex_str; UT_NOT_USED(name); - + os_mutex = ut_malloc(sizeof(os_fast_mutex_t)); os_fast_mutex_init(os_mutex); @@ -342,7 +342,7 @@ os_mutex_create( mutex_str->count = 0; return(mutex_str); -#endif +#endif } /************************************************************** @@ -398,7 +398,7 @@ os_mutex_exit( (mutex->count)--; os_fast_mutex_unlock(mutex->handle); -#endif +#endif } /************************************************************** @@ -432,7 +432,7 @@ os_fast_mutex_init( { #ifdef __WIN__ ut_a(fast_mutex); - + InitializeCriticalSection((LPCRITICAL_SECTION) fast_mutex); #else pthread_mutex_init(fast_mutex, NULL); |