@@ -67,28 +67,25 @@ int git_thread_join(
6767 return 0 ;
6868}
6969
70- int pthread_mutex_init (
71- pthread_mutex_t * GIT_RESTRICT mutex ,
72- const pthread_mutexattr_t * GIT_RESTRICT mutexattr )
70+ int git_mutex_init (git_mutex * GIT_RESTRICT mutex )
7371{
74- GIT_UNUSED (mutexattr );
7572 InitializeCriticalSection (mutex );
7673 return 0 ;
7774}
7875
79- int pthread_mutex_destroy ( pthread_mutex_t * mutex )
76+ int git_mutex_free ( git_mutex * mutex )
8077{
8178 DeleteCriticalSection (mutex );
8279 return 0 ;
8380}
8481
85- int pthread_mutex_lock ( pthread_mutex_t * mutex )
82+ int git_mutex_lock ( git_mutex * mutex )
8683{
8784 EnterCriticalSection (mutex );
8885 return 0 ;
8986}
9087
91- int pthread_mutex_unlock ( pthread_mutex_t * mutex )
88+ int git_mutex_unlock ( git_mutex * mutex )
9289{
9390 LeaveCriticalSection (mutex );
9491 return 0 ;
@@ -124,7 +121,7 @@ int pthread_cond_destroy(pthread_cond_t *cond)
124121 return 0 ;
125122}
126123
127- int pthread_cond_wait (pthread_cond_t * cond , pthread_mutex_t * mutex )
124+ int pthread_cond_wait (pthread_cond_t * cond , git_mutex * mutex )
128125{
129126 int error ;
130127 DWORD wait_result ;
@@ -133,7 +130,7 @@ int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
133130 return EINVAL ;
134131
135132 /* The caller must be holding the mutex. */
136- error = pthread_mutex_unlock (mutex );
133+ error = git_mutex_unlock (mutex );
137134
138135 if (error )
139136 return error ;
@@ -142,7 +139,7 @@ int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
142139 assert (WAIT_OBJECT_0 == wait_result );
143140 GIT_UNUSED (wait_result );
144141
145- return pthread_mutex_lock (mutex );
142+ return git_mutex_lock (mutex );
146143}
147144
148145int pthread_cond_signal (pthread_cond_t * cond )
0 commit comments