1 extern int printf(const char *, ...);
2 typedef unsigned short ushort
;
12 struct seminfo
*__buf
;
15 static union semun semctl_arg
;
17 static void up(int sem
){
19 sb
.sem_num
= (unsigned short) sem
;
22 if(semop(semid
, &sb
, 1) == -1) error("up failure");
23 if(semctl(semid
, sb
.sem_num
, 12 , semctl_arg
) == 0)
24 printf("%s had processes sleeping on it!\n",
25 ({ "MUTEX ", "BARB_SEM 1", "BARB_SEM 2", "CUST_SEM 1",
26 "CUST_SEM 2", "WAIT_SEM 1", "WAIT_SEM 2", "WAIT_SEM 3",
27 "WAIT_SEM 4"} /* { dg-error "parse error|syntax error|expected" } */
28 [( sb
.sem_num
)]) ); /* { dg-error "expected" } */