Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Dec 1999 18:45:04 -0800
From:      Jason Evans <jasone@canonware.com>
To:        freebsd-hackers@freebsd.org
Subject:   *jmp() renaming in libc
Message-ID:  <19991206184504.N57183@sturm.canonware.com>

next in thread | raw e-mail | index | archive | help
I'm porting the most recent released version of LinuxThreads
(glibc-linuxthreads-2.1.2), and ran into a bit of a problem with regard to
longjmp() and siglongjmp().  LinuxThreads wraps these functions so that
they work correctly in the presence of cleanup handlers.  However, this
doesn't appear to be possible with our C library, since there are no other
names by which to access sigsetjmp() and siglongjmp().  I noticed the
following comment in src/lib/libc/i386/gen/sigsetjmp.S:

/*-
 * TODO:
 * Rename sigsetjmp to __sigsetjmp and siglongjmp to __siglongjmp,
 * remove the other *jmp functions and define everything in terms
 * of the renamed functions.  This requires compiler support for
 * the renamed functions (introduced in gcc-2.5.3; previous versions
 * only supported *jmp with 0 or 1 leading underscores).
 *

 [...]

 */

If this were done, I think it would solve my problem.  However, it looks to
be an almost trivially easy change for someone familiar with libc, yet it
hasn't happened for the several years that it has been possible.  Also, for
the alpha platform, sigsetjmp() and siglongjmp() are defined in terms of
setjmp(), _setjmp(), longjmp(), and _longjmp(), which is essentially the
opposite approach of what the TODO comment suggests.  Is there a reason
that this TODO comment hasn't been acted on, other than no one getting
around to it?

Jason


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991206184504.N57183>