From: Philippe Benard <phi@hpfrcu03.france.hp.com>
Subject: msem_lock behavior on OSF1?
Date: 1997/02/24 [thread overview]
Message-ID: <3311AF64.4198@hpfrcu03.france.hp.com> (raw)
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 <unistd.h>
#include <sys/mman.h>
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
reply other threads:[~1997-02-24 5:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox