3 ms·
This article is pretty terrifying: #import <pthread.h> #import <stdlib.h> // Globals pthread_mutex_t *gLck; int gSum;
by logancapaldo 15y ago
This article is pretty terrifying:
#import <pthread.h>
#import <stdlib.h>
// Globals
pthread_mutex_t *gLck;
int gSum;
int main (int argc, const char * argv[])
{
pthread_t *tFoo, *tBar;
int tErr, tArgF, tArgB;
// create the mutex construct
tErr = pthread_mutex_init(gLck);