From: wilking@atlas.de
Date: Wed Jan 12 2005 - 05:32:46 EST
I use the gcc compiler (Compiler flags: -DHPUX_THREADS -DINLINE_PRAGMA, linking: -ltermcap -lm -ldce). An example for the sem_init call:
#include <semaphore.h>
sema_t sema ;
assert(semap) ;
*semap = NULL ;
sema = (sema_t) malloc(sizeof(*sema)) ;
if (sema == NULL) return -1;
if (sem_init(&sema->sema, initial_value, 0)) {
switch(errno)
{
case EINVAL:
{
fprintf(stderr, " errno= EINVAL \n");
break;
}
case ENOSPC:
{
fprintf(stderr, " errno= ENOSPC \n");
break;
}
case ENOSYS:
{
fprintf(stderr, " errno= ENOSYS \n");
break;
}
case EPERM:
{
fprintf(stderr, " errno= EPERM \n");
break;
}
default:
{
fprintf(stderr, " errno= unbekanntes Problem \n");
break;
}
}
return -1;
}
*semap = sema ;
return TEST_OK;
}
The exception I get is ENOSYS (The sem_init function is not supported by the system). It looks that semaphore.h is not yet implemented.
-----Ursprüngliche Nachricht-----
Von: Prashun Gupta [mailto:prashung@iin.com]
Gesendet: Mittwoch, 12. Januar 2005 10:13
An: Wilking, Sascha
Betreff: Re: [HPADM] Problems with semaphores under HP 10.20
Please send some code snippets and your makefile.
Which compiler you are using?
Thanks
Prashun
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Prashun Gupta
Tekmark Compucom International Solutions Llc.
(Telecom NMS Division)
IT-14/15 EPIP Sitapura Ind. Area,
Jaipur Rajasthan India 302017
Phone:
91-141- 5115907(Direct Office)
91-141-2770131,2,3 x123,124(Office EPABX)
91-9314876997(Mobile)
91-141-2754337(Residence)
1-732-383-1223(USA VOIP number)
Fax
91-141-2770335
----- Original Message -----
From: wilking@atlas.de
To: hpux-admin@DutchWorks.nl
Sent: Wednesday, January 12, 2005 1:22 PM
Subject: [HPADM] Problems with semaphores under HP 10.20
Hello,
I've problems with semaphores under HP-UX 10.20. I've include the semaphore.h file and will be use the functions sem_init, sem_wait, sem_post, sem_destroy and sem_close. When I call one of the functions I get an exception ENOSYS (The ... function is not supported by the system). How can I resolve the problem? Does it give any patch or an update for HP-UX 10.20?
Best regards
Sascha
-- ---> Please post QUESTIONS and SUMMARIES only!! <--- To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl Name: hpux-admin@dutchworks.nl Owner: owner-hpux-admin@dutchworks.nl Archives: ftp.dutchworks.nl:/pub/digests/hpux-admin (FTP, browse only) http://www.dutchworks.nl/htbin/hpsysadmin (Web, browse & search)
This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:45 EDT