Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
1
Task/Mutex/C/mutex-1.c
Normal file
1
Task/Mutex/C/mutex-1.c
Normal file
|
|
@ -0,0 +1 @@
|
|||
HANDLE hMutex = CreateMutex(NULL, FALSE, NULL);
|
||||
1
Task/Mutex/C/mutex-2.c
Normal file
1
Task/Mutex/C/mutex-2.c
Normal file
|
|
@ -0,0 +1 @@
|
|||
WaitForSingleObject(hMutex, INFINITE);
|
||||
1
Task/Mutex/C/mutex-3.c
Normal file
1
Task/Mutex/C/mutex-3.c
Normal file
|
|
@ -0,0 +1 @@
|
|||
ReleaseMutex(hMutex);
|
||||
1
Task/Mutex/C/mutex-4.c
Normal file
1
Task/Mutex/C/mutex-4.c
Normal file
|
|
@ -0,0 +1 @@
|
|||
CloseHandle(hMutex);
|
||||
3
Task/Mutex/C/mutex-5.c
Normal file
3
Task/Mutex/C/mutex-5.c
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#include <pthread.h>
|
||||
|
||||
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
2
Task/Mutex/C/mutex-6.c
Normal file
2
Task/Mutex/C/mutex-6.c
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
pthread_mutex_t mutex;
|
||||
pthread_mutex_init(&mutex, NULL);
|
||||
1
Task/Mutex/C/mutex-7.c
Normal file
1
Task/Mutex/C/mutex-7.c
Normal file
|
|
@ -0,0 +1 @@
|
|||
int error = pthread_mutex_lock(&mutex);
|
||||
1
Task/Mutex/C/mutex-8.c
Normal file
1
Task/Mutex/C/mutex-8.c
Normal file
|
|
@ -0,0 +1 @@
|
|||
int error = pthread_mutex_unlock(&mutex);
|
||||
1
Task/Mutex/C/mutex-9.c
Normal file
1
Task/Mutex/C/mutex-9.c
Normal file
|
|
@ -0,0 +1 @@
|
|||
int error = pthread_mutex_trylock(&mutex);
|
||||
Loading…
Add table
Add a link
Reference in a new issue