Bug#720188: kfreebsd: please implemente/expose waitid function wait6 syscall

2013-11-01 Thread Dmitrijs Ledkovs
On 20 August 2013 07:26, Petr Salinger petr.salin...@seznam.cz wrote:
 It is planned, but (e)glibc 2.18 upload have to go first, due to changes
 of
 idtype_t values. See also 218_waitid* in
 http://anonscm.debian.org/viewvc/glibc-bsd/trunk/glibc-ports/

 We also have to provide (reasonable) fallback implementation
 under wheezy kernels.


 Cool! Excellent stuff! I've tried applying 218_waitid* things against
 the eglibc-package as is in the debian trunk (2.17 based) and failed
 to compile it properly.
 Is there a way for me to compile debs


 The 218_waitid_common.diff is against main tree,
 the 218_waitid_kbsd.diff is against kfreebsd/ subdir
 and 218_waitid.c have to be placed as waitid.c in kfreebsd/ subdir.

 It worked a month ago ;-)


Right, and it still works, well at raising system errors =) I've now
tried it from the eglibc-2.18 packaging branch.

I've tried adding wait6 syscall  implementing waitid using it, but it
didn't quite managed to make it compile (i got linker errors waying it
cannot find __GI___syscall_wait6).

Can we set minimal kfreebsd kernel version when configuring/compiling
eglibc such that if compatibility with older freebsd kernels is needed
the wrapper implementation is used,
otherwise if compiled for freebsd kernels = 9.2, wait6 version is
used? And then distributions, e.g. kfreebsd/Debian can choose where to
cut the line.

Can you see what I have done wrong? (it's my first time trying to hack on glibc)

Regards,

Dmitrijs.
--- foo/eglibc-2.18/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/syscalls-inline.h	2013-11-01 12:33:10.0 +
+++ eglibc-2.18/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/syscalls-inline.h	2013-11-01 01:12:34.0 +
@@ -45,14 +45,16 @@
 
 int __syscall_fcntl(int fd, int cmd, ...);
 int __syscall_fork(void);
 int __syscall_wait4(int pid, int *status, int options, struct rusage *rusage);
+int __syscall_wait6(idtype_t itype, id_t id, int *status, int options, struct rusage *rusage, siginfo_t *infop);
 int __syscall_sigsuspend (const sigset_t *set);
 int __syscall_sigprocmask (int how, const sigset_t *set, sigset_t *oldset);
 int __syscall_nanosleep (const struct timespec *requested_time, struct timespec *remaining);
 libc_hidden_proto (__syscall_fcntl)
 libc_hidden_proto (__syscall_fork)
 libc_hidden_proto (__syscall_wait4)
+libc_hidden_proto (__syscall_wait6)
 libc_hidden_proto (__syscall_sigsuspend)
 libc_hidden_proto (__syscall_sigprocmask)
 libc_hidden_proto (__syscall_nanosleep)
 
--- foo/eglibc-2.18/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/syscalls.list	2013-11-01 12:33:10.0 +
+++ eglibc-2.18/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/syscalls.list	2013-11-01 01:07:26.0 +
@@ -206,7 +206,8 @@
 unlinkat		-	unlinkat		i:isi		unlinkat
 unmount			-	unmount			i:si		unmount
 utrace			-	utrace			i:bn		utrace
 wait4			-	wait4			i:iWiP		__syscall_wait4 __wait4	wait4
+wait6			-	wait6			i:iiWiPP		__syscall_wait6 __wait6	wait6
 sys_write		-	write			i:ibn		__syscall_write
 sys_writev		-	writev			i:ipi		__syscall_writev
 yield			-	yield			i:		__syscall_yield
--- foo/eglibc-2.18/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/waitid.c	2013-11-01 12:33:10.0 +
+++ eglibc-2.18/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/waitid.c	2013-11-01 01:26:07.0 +
@@ -21,15 +21,33 @@
 #include errno.h
 #include sys/wait.h
 #include sysdep.h
 
-/* for now only the wrapper implementation */
-/* later on we will try to use wait6 when available */
+extern int __syscall_wait6 (idtype_t itype, id_t id,
+			int *status, int options,
+			struct rusage *rusage, siginfo_t *infop);
+libc_hidden_proto (__syscall_wait6)
 
 #define waitid __unused_waitid_alias
+static inline int
+do_waitid (idtype_t idtype, id_t id, siginfo_t *infop, int options)
+{
+  int ret;
+  int status;
+  
+  ret = INLINE_SYSCALL (wait6, 6, idtype, id, status, options, NULL, infop);
+
+  if (ret  0)
+ret = 0;
+
+  return ret;
+}
+
+#define NO_DO_WAITID
 #include sysdeps/posix/waitid.c
 #undef waitid
 
+
 versioned_symbol (libc, __waitid, waitid, GLIBC_2_18);
 
 #if SHLIB_COMPAT (libc, GLIBC_2_1, GLIBC_2_18)
 


Bug#720188: kfreebsd: please implemente/expose waitid function wait6 syscall

2013-08-20 Thread Petr Salinger

It is planned, but (e)glibc 2.18 upload have to go first, due to changes of
idtype_t values. See also 218_waitid* in
http://anonscm.debian.org/viewvc/glibc-bsd/trunk/glibc-ports/

We also have to provide (reasonable) fallback implementation
under wheezy kernels.


Cool! Excellent stuff! I've tried applying 218_waitid* things against
the eglibc-package as is in the debian trunk (2.17 based) and failed
to compile it properly.
Is there a way for me to compile debs


The 218_waitid_common.diff is against main tree,
the 218_waitid_kbsd.diff is against kfreebsd/ subdir
and 218_waitid.c have to be placed as waitid.c in kfreebsd/ subdir.

It worked a month ago ;-)


or apt-get libc 2.18 with above patches applied?


The eglibc upstream have not yet merged glibc 2.18.

Petr


--
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/alpine.lnx.2.00.1308200815350.3...@contest.felk.cvut.cz



Bug#720188: kfreebsd: please implemente/expose waitid function wait6 syscall

2013-08-19 Thread Dmitrijs Ledkovs
Package: libc0.1-dev
Version: 2.17-92
Severity: normal
X-Debbugs-CC: petr.salin...@seznam.cz

Dear Maintainer,
Recently in FreeBSD waitid was implemented[1] this includes:
* waitid function, implemented via wait6 syscall
* option flags WEXITED WTRAPPED added

More details  patch in the PR linked.

This is now available in prerelease FreeBSD 9.2 (I'm using 9.2-rc2). I
have verified and tested that it works correctly for my needs.

[1] http://www.freebsd.org/cgi/query-pr.cgi?pr=170346cat=

Can it please be added to eglibc as used by Debian/kFreeBSD ports? the
9.2 kernel is already available in Debian. (If possible in sid, or
e.g. at least in experimental)

I can help writting a patch, but I have no prior knoweledge in hacking eglibc.

Regards,

Dmitrijs.

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: kfreebsd-amd64 (x86_64)

Kernel: kFreeBSD 10.0-0-amd64
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libc0.1-dev:kfreebsd-amd64 depends on:
ii  kfreebsd-kernel-headers  9.1-3
ii  libc-dev-bin 2.17-92
ii  libc0.1  2.17-92

Versions of packages libc0.1-dev:kfreebsd-amd64 recommends:
ii  gcc [c-compiler]  4:4.7.2-1
ii  gcc-4.7 [c-compiler]  4.7.3-6

Versions of packages libc0.1-dev:kfreebsd-amd64 suggests:
pn  glibc-doc none
pn  manpages-dev  none

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CANBHLUisGZrTFctsWO_pZoU5o8=bocmdsyvuex1lfr6nxei...@mail.gmail.com



Bug#720188: kfreebsd: please implemente/expose waitid function wait6 syscall

2013-08-19 Thread Petr Salinger

Recently in FreeBSD waitid was implemented[1] this includes:
* waitid function, implemented via wait6 syscall
* option flags WEXITED WTRAPPED added

More details  patch in the PR linked.

This is now available in prerelease FreeBSD 9.2 (I'm using 9.2-rc2). I
have verified and tested that it works correctly for my needs.

[1] http://www.freebsd.org/cgi/query-pr.cgi?pr=170346cat=

Can it please be added to eglibc as used by Debian/kFreeBSD ports? the
9.2 kernel is already available in Debian. (If possible in sid, or
e.g. at least in experimental)

I can help writting a patch, but I have no prior knoweledge in hacking eglibc.


It is planned, but (e)glibc 2.18 upload have to go first, due to changes 
of idtype_t values. See also 218_waitid* in

http://anonscm.debian.org/viewvc/glibc-bsd/trunk/glibc-ports/

We also have to provide (reasonable) fallback implementation
under wheezy kernels.

Petr


--
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/alpine.lnx.2.00.1308191638450.8...@contest.felk.cvut.cz



Bug#720188: kfreebsd: please implemente/expose waitid function wait6 syscall

2013-08-19 Thread Dmitrijs Ledkovs
On 19 August 2013 15:43, Petr Salinger petr.salin...@seznam.cz wrote:
 Recently in FreeBSD waitid was implemented[1] this includes:
 * waitid function, implemented via wait6 syscall
 * option flags WEXITED WTRAPPED added

 More details  patch in the PR linked.

 This is now available in prerelease FreeBSD 9.2 (I'm using 9.2-rc2). I
 have verified and tested that it works correctly for my needs.

 [1] http://www.freebsd.org/cgi/query-pr.cgi?pr=170346cat=

 Can it please be added to eglibc as used by Debian/kFreeBSD ports? the
 9.2 kernel is already available in Debian. (If possible in sid, or
 e.g. at least in experimental)

 I can help writting a patch, but I have no prior knoweledge in hacking
 eglibc.


 It is planned, but (e)glibc 2.18 upload have to go first, due to changes of
 idtype_t values. See also 218_waitid* in
 http://anonscm.debian.org/viewvc/glibc-bsd/trunk/glibc-ports/

 We also have to provide (reasonable) fallback implementation
 under wheezy kernels.


Cool! Excellent stuff! I've tried applying 218_waitid* things against
the eglibc-package as is in the debian trunk (2.17 based) and failed
to compile it properly.
Is there a way for me to compile debs or apt-get libc 2.18 with above
patches applied?

Regards,

Dmitrijs.


-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/canbhluhkxfqmpspfwqevyihsaf5psfonjmuvllx+wg+rgxd...@mail.gmail.com