13 printf(
"test1: %x mutex_locked\n", &
test_lock);
16 printf(
"test1: %x mutex_unlocked\n", &
test_lock);
22 { printf(
"test2: want mutex_lock\n");
24 printf(
"test2: %x mutex_locked\n", &
test_lock);
27 printf(
"test2: %x mutex_unlocked\n", &
test_lock);
35 int stat, *statp, stat2,
s=1, exitstat, N;
36 struct tms t1,t2,t3,t4,t5,t6;
41 stat2=thr_min_stack();
42 if (argc>=2) sscanf(argv[1],
"%d", &concurrency);
44 if (argc>=3) sscanf(argv[2],
"%d", &N);
47 thr_setconcurrency(concurrency);
48 printf(
"self=%d minstack=%x concurrency=%d CLK_TCK=%d\n\n",
49 stat, stat2, thr_getconcurrency(), CLK_TCK);
53 printf(
"test1 thread %d created\n", thrid[1]);
55 printf(
"test2 thread %d created\n", thrid[2]);
int thr_join(int tid, int *depature, void **status)
int thr_create(void *, size_t, void(*)(), void *, long, int *)