equal
deleted
inserted
replaced
1291 { |
1291 { |
1292 key_t key; |
1292 key_t key; |
1293 int semid; |
1293 int semid; |
1294 union semun arg; |
1294 union semun arg; |
1295 INFO_PRINTF1(_L("IntgTest14")); |
1295 INFO_PRINTF1(_L("IntgTest14")); |
1296 char *path; |
1296 char *path = NULL; |
1297 |
1297 path = "c:\\tstdapis\\tsemaphore.ini"; |
1298 #if defined (__EPOC32__) |
1298 |
1299 path = "z:\\tstdapis\\tsemaphore.ini"; |
1299 if ((key = ftok(path, 'P')) == -1) |
1300 #else |
|
1301 path = "c:\\tstdapis\\tsemaphore.ini"; |
|
1302 #endif |
|
1303 |
|
1304 if ((key = ftok(path, 'P')) == -1) |
|
1305 { |
1300 { |
1306 ERR_PRINTF1(_L("ftok error!")); |
1301 ERR_PRINTF1(_L("ftok error!")); |
|
1302 _LIT(KFunc, "ftok failed with errno %d\n"); |
|
1303 INFO_PRINTF2(KFunc, errno); |
1307 return KErrGeneral; |
1304 return KErrGeneral; |
1308 } |
1305 } |
1309 |
1306 |
1310 /* create a semaphore set with 1 semaphore: */ |
1307 /* create a semaphore set with 1 semaphore: */ |
1311 if ((semid = semget(key, 1, 0666 | IPC_CREAT)) == -1) |
1308 if ((semid = semget(key, 1, 0666 | IPC_CREAT)) == -1) |