~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/os/os0sync.c

  • Committer: Brian Aker
  • Date: 2010-12-25 00:28:49 UTC
  • mto: This revision was merged to the branch mainline in revision 2031.
  • Revision ID: brian@tangent.org-20101225002849-g73mg6ihulajis0o
First pass in refactoring of the name of my_decimal.

Show diffs side-by-side

added added

removed removed

Lines of Context:
390
390
        {
391
391
                UT_NOT_USED(name);
392
392
 
393
 
                event = static_cast<os_event_struct*>(ut_malloc(sizeof(struct os_event_struct)));
 
393
                event = ut_malloc(sizeof(struct os_event_struct));
394
394
 
395
395
                os_fast_mutex_init(&(event->os_mutex));
396
396
 
777
777
        os_fast_mutex_t*        mutex;
778
778
        os_mutex_t              mutex_str;
779
779
 
780
 
        mutex = static_cast<os_fast_mutex_t*>(ut_malloc(sizeof(os_fast_mutex_t)));
 
780
        mutex = ut_malloc(sizeof(os_fast_mutex_t));
781
781
 
782
782
        os_fast_mutex_init(mutex);
783
 
        mutex_str = static_cast<os_mutex_t>(ut_malloc(sizeof(os_mutex_str_t)));
 
783
        mutex_str = ut_malloc(sizeof(os_mutex_str_t));
784
784
 
785
785
        mutex_str->handle = mutex;
786
786
        mutex_str->count = 0;
810
810
/*===========*/
811
811
        os_mutex_t      mutex)  /*!< in: mutex to acquire */
812
812
{
813
 
        os_fast_mutex_lock(static_cast<os_fast_mutex_t *>(mutex->handle));
 
813
        os_fast_mutex_lock(mutex->handle);
814
814
 
815
815
        (mutex->count)++;
816
816
 
830
830
        ut_a(mutex->count == 1);
831
831
 
832
832
        (mutex->count)--;
833
 
        os_fast_mutex_unlock(static_cast<os_fast_mutex_t *>(mutex->handle));
 
833
        os_fast_mutex_unlock(mutex->handle);
834
834
}
835
835
 
836
836
/**********************************************************//**
859
859
                os_mutex_exit(os_sync_mutex);
860
860
        }
861
861
 
862
 
        os_fast_mutex_free(static_cast<os_fast_mutex_t *>(mutex->handle));
 
862
        os_fast_mutex_free(mutex->handle);
863
863
        ut_free(mutex->handle);
864
864
        ut_free(mutex);
865
865
}
877
877
 
878
878
        InitializeCriticalSection((LPCRITICAL_SECTION) fast_mutex);
879
879
#else
880
 
        ut_a(0 == pthread_mutex_init(fast_mutex, NULL));
 
880
        ut_a(0 == innobase_fast_mutex_init(fast_mutex));
881
881
#endif
882
882
        if (UNIV_LIKELY(os_sync_mutex_inited)) {
883
883
                /* When creating os_sync_mutex itself (in Unix) we cannot