Thread
Thread
Thread
h>
#include <stdio.h>
#define NUM_THREADS 3
#define MAX_SIZE 10
int size;
int matrix1[MAX_SIZE][MAX_SIZE];
int matrix2[MAX_SIZE][MAX_SIZE];
int result[NUM_THREADS][MAX_SIZE][MAX_SIZE];
int main()
{
int i, j;
pthread_t tid[NUM_THREADS];
pthread_attr_t attr;
int scope;
if (scope == PTHREAD_SCOPE_PROCESS)
printf("PTHREAD SCOPE PROCESS\n");
else if (scope == PTHREAD_SCOPE_SYSTEM)
printf("PTHREAD SCOPE SYSTEM\n");
else
{
fprintf(stderr, "Illegal scope value.\n");
return 1;
}
return 0;
}
pthread_exit(0);
}
pthread_exit(0);
}
pthread_exit(0);
}