From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,9998d5b8da5504f8,start X-Google-Attributes: gidfee84,public From: Philippe Benard Subject: msem_lock behavior on OSF1? Date: 1997/02/24 Message-ID: <3311AF64.4198@hpfrcu03.france.hp.com>#1/1 X-Deja-AN: 221081148 Content-Type: text/plain; charset=us-ascii Organization: WTEC Mime-Version: 1.0 Newsgroups: comp.unix.osf.osf1 X-Mailer: Mozilla 3.01Gold (X11; I; HP-UX B.10.20 9000/712) Hi OSF/1 comunity, I'd like to know the behavior of OSF/1 regarding the msem_lock() call. When doing a double msem_lock() from 1 process, I'd like to know if the second msem_lock() get suspended, because the process already have the lock, or if the 2nd lock failed with errno EDEADLK because there is a dead lock situation. I give here a little prog, if someone can run it, it would be nice. --------------- p.c: #include #include main() { char *p; int sts; p = (char*) mmap(NULL, (1)*sysconf(_SC_PAGE_SIZE), PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_VARIABLE | MAP_SHARED, -1, 0 ); printf("#1\n"); sts = msem_init(p,0); printf("#2 sts=0x%08x\n",sts); sts = msem_lock(p,0); printf("#3 sts=%d\n",sts); sts = msem_lock(p,0); printf("#4 sts=%d\n",sts); } --------- Eventually MAP_VARIABLE, could be removed if you can't have it on your implementation (and may be MAP_ANONYMOUS?) You compile it with cc -v -o p p.v You run it ./p Then if it hangs there, you ^c (intr) it and let me know If it return with sts= -1 let me know too. Let me know also the machine you run it (In fact I'm interested in Dec Alpha, but any other run are interesting too) Thanx in advance. Phi PS : Please mail me I'm not scaning the new very often. Phi -- Philippe BENARD mailto:phi@hpfrcu03.france.hp.com