mailing list of musl libc
 help / color / mirror / code / Atom feed
* semtcl for x86_64
@ 2012-09-22  8:26 Jens
  2012-09-22  9:17 ` Jens
  2012-09-22 12:14 ` Jens
  0 siblings, 2 replies; 8+ messages in thread
From: Jens @ 2012-09-22  8:26 UTC (permalink / raw)
  To: musl


Hello I have some trouble getting semctl working:

Tried in both musl and uclibc to compare.
See below.

The only difference I can see is the IPC_64 flag.

(I haven't tried 32-bit).

Regards,
Jens

program:
bash-4.1# cat t.c
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>

main() {
 	int sem;
//  semget(IPC_PRIVATE, 1, IPC_CREAT|0600) = 131076
   sem = semget(IPC_PRIVATE, 1, IPC_CREAT);
   semctl(sem, 0, SETVAL, 0x1);

}

musl:

bash-4.1# /bin64/strace ./m
execve("./m", ["./m"], [/* 19 vars */]) = 0
semget(IPC_PRIVATE, 1, IPC_CREAT|0)     = 327688
semctl(327688, 0, IPC_64|SETVAL, 0x1)   = -1 EINVAL (Invalid argument)
exit_group(-1)                          = ?
bash-4.1#


uclibc:

semget(IPC_PRIVATE, 1, IPC_CREAT|0)     = 262150
semctl(262150, 0, SETVAL, 0x1)          = 0
_exit(0)                                = ?
bash-4.1#


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-09-22 20:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-22  8:26 semtcl for x86_64 Jens
2012-09-22  9:17 ` Jens
2012-09-22 12:04   ` Rich Felker
2012-09-22 12:17     ` Jens
2012-09-22 12:25       ` Rich Felker
2012-09-22 17:09     ` Jens
2012-09-22 20:09       ` Rich Felker
2012-09-22 12:14 ` Jens

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).