modified: SpatialOmicsCoord.py
[GalaxyCodeBases.git] / c_cpp / pthreadtest / 11size.c
blob0a8d79e1ada83127c22104b1ef3874789b8e47ad
1 /* mutexex.c */
2 /* Simple pthread example using pthread_mutex to ensure mutual exclusion */
3 /* This corrects the bug from raceexample.c */
4 /* To compile me for Linux, type: gcc -o filename filename.c -lpthread */
5 /* To execute, type: filename */
6 #define _GNU_SOURCE
7 #include <pthread.h>
8 #include <stdio.h>
9 #include <stdlib.h>
10 #include <sys/resource.h>
13 pthread_mutex_t mut1=PTHREAD_MUTEX_INITIALIZER;
14 pthread_spinlock_t spin1;
15 pthread_cond_t cond1;
17 int main(void) {
18 puts("Sizes:");
19 printf("pthread_cond_t\t%zd\n",sizeof(cond1));
20 printf("pthread_spinlock_t\t%zd\n",sizeof(spin1));
21 printf("pthread_mutex_t\t%zd\n",sizeof(mut1));
22 return(0);