From nobody Wed Mar 13 18:36:35 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TvzkC2XT5z5DRN5; Wed, 13 Mar 2024 18:36:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TvzkC1TT5z4Sd8; Wed, 13 Mar 2024 18:36:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710354995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xlPUJimje2t70H860P/bvpkOFhN0v9gbj9Kmo8zZTl8=; b=Fy/93P4NY09vlBcA4NP1ybbioJ9d5drckC5eIQDXN8b8VgMl4MlVPaCJpfddlATSX2Ky26 BfK5W+cFhzYKQ8QcYry5PWve9OZGFp0K55SYHY9/IA5HQP+mvT36blyRRgjeEFmx43NgUT RLY6Veu2ojhaTemXZ0J52wg4hpklDy5rr8HjTGYVcs5Oivl+LZqlo4bF4S5Nvq8l9uK4uk ooF+NmRLoHaf/GqggLdD+COq+xO0lj/pwWSN/cvSCme1kO6oK0s99npAkXakQRmExu5I3R ozwNJhp99Akm6UHIC1f+Znu7cXBeFX0s12FPJzO/vhMCaNaCYyWCVUJr3OCxog== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710354995; a=rsa-sha256; cv=none; b=LVJB48h2OG5kCsQPfqZDueKbIJ+RsSWucbx/mkjEH3tn4yZdDgpICfo1dwiSBxBOfa1J1F ToO8nBKvQoN5Of3Fxu1QHi+75tdCb2vqa2tOROc5+I52R6MXJf8GPd0W+Mn6l3RrjvK8qm wkmfqqxt1NwpVA6BJ3gCgKK157lDQbl4AuG+WJxWJ65cDZdB7AVMWrtAOiN4nVgSy+nIGB 4UjnxyLdXZp2jXENzyZ3vUU2F/fbQlMstNJvGIKFCjLMo/SkCCeiKoffmelZkN58XNx+oo 9yxw9dRNCkJ9AhOfVgAdDjO45NGf2e/tkRIQbux3a+lz8kmJMjlrOj/Zn2TEpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710354995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xlPUJimje2t70H860P/bvpkOFhN0v9gbj9Kmo8zZTl8=; b=jUlW40SinLCKHnDS/+JkwBvwMBmvTcQdX+j4D85aGeqEZuQR70O5puNvvruIS51vNOdWMv syuDkOCJmIoy08mZhJ7oKwycP/ZCf4iGJ0LZFF1lthWzzsEz2IAOL6HDadv2XnMXRzF6Ri sxnYWcy8IjBB/Wn1GLRW3vrIrVKvW46k6TFF0X2NGzYdHYihAv5CDHfCEoItR6fjiD+dnN uZcopYApin4QZIHcDvbuPQrZ8w3e35QVv0wI1NZ+fDGJKOvwwuJBcTeXzpnRwMUybyXMJa mBkhF50/txnkhKoEiKNApl58QKN3kfCrjc7t7nYi0MIz5cv8sCtqYWXI2+SfNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TvzkC0y4vztYk; Wed, 13 Mar 2024 18:36:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42DIaZE5002601; Wed, 13 Mar 2024 18:36:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42DIaZT4002598; Wed, 13 Mar 2024 18:36:35 GMT (envelope-from git) Date: Wed, 13 Mar 2024 18:36:35 GMT Message-Id: <202403131836.42DIaZT4002598@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: d7847a8d3514 - main - lib{c,sys}: return wrapped syscall APIs to libc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d7847a8d351436a4654bd2c746bc9c04401160ee Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=d7847a8d351436a4654bd2c746bc9c04401160ee commit d7847a8d351436a4654bd2c746bc9c04401160ee Author: Brooks Davis AuthorDate: 2024-03-13 17:42:01 +0000 Commit: Brooks Davis CommitDate: 2024-03-13 18:36:02 +0000 lib{c,sys}: return wrapped syscall APIs to libc These provide standard APIs, but are implemented using another system call (e.g., pipe implemented in terms of pipe2) or are interposed by the threading library to support cancelation. After discussion with kib (see D44111), I've concluded that it is better to keep most public interfaces in libc with as little as possible in libsys. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D44241 --- lib/libc/Makefile | 3 +- lib/libc/amd64/Symbol.map | 3 ++ lib/libc/arm/Symbol.map | 3 ++ lib/libc/i386/Symbol.map | 3 ++ lib/libc/powerpc/Symbol.map | 2 + lib/libc/powerpc64/Symbol.map | 2 + lib/libc/sys/Makefile.inc | 38 ++++++++++++++++ lib/{libsys => libc/sys}/POSIX2x_Fork.c | 0 lib/libc/sys/Symbol.map | 73 ++++++++++++++++++++++++++++++ lib/{libsys => libc/sys}/accept.c | 0 lib/{libsys => libc/sys}/accept4.c | 0 lib/{libsys => libc/sys}/aio_suspend.c | 0 lib/{libsys => libc/sys}/brk.c | 0 lib/{libsys => libc/sys}/clock_nanosleep.c | 0 lib/{libsys => libc/sys}/close.c | 0 lib/{libsys => libc/sys}/closefrom.c | 0 lib/{libsys => libc/sys}/compat-stub.c | 0 lib/{libsys => libc/sys}/connect.c | 0 lib/{libsys => libc/sys}/creat.c | 0 lib/{libsys => libc/sys}/fcntl.c | 0 lib/{libsys => libc/sys}/fdatasync.c | 0 lib/{libsys => libc/sys}/fork.c | 0 lib/{libsys => libc/sys}/fsync.c | 0 lib/{libsys => libc/sys}/getdents.c | 0 lib/{libsys => libc/sys}/kevent.c | 0 lib/{libsys => libc/sys}/lockf.c | 0 lib/{libsys => libc/sys}/lstat.c | 0 lib/{libsys => libc/sys}/mknod.c | 0 lib/{libsys => libc/sys}/msync.c | 0 lib/{libsys => libc/sys}/nanosleep.c | 0 lib/{libsys => libc/sys}/open.c | 0 lib/{libsys => libc/sys}/openat.c | 0 lib/{libsys => libc/sys}/pdfork.c | 0 lib/{libsys => libc/sys}/pipe.c | 0 lib/{libsys => libc/sys}/poll.c | 0 lib/{libsys => libc/sys}/ppoll.c | 0 lib/{libsys => libc/sys}/pselect.c | 0 lib/{libsys => libc/sys}/read.c | 0 lib/{libsys => libc/sys}/readv.c | 0 lib/{libsys => libc/sys}/recv.c | 0 lib/{libsys => libc/sys}/recvfrom.c | 0 lib/{libsys => libc/sys}/recvmsg.c | 0 lib/{libsys => libc/sys}/select.c | 0 lib/{libsys => libc/sys}/send.c | 0 lib/{libsys => libc/sys}/sendmsg.c | 0 lib/{libsys => libc/sys}/sendto.c | 0 lib/{libsys => libc/sys}/setcontext.c | 0 lib/{libsys => libc/sys}/shm_open.c | 0 lib/{libsys => libc/sys}/sigaction.c | 0 lib/{libsys => libc/sys}/sigprocmask.c | 0 lib/{libsys => libc/sys}/sigsuspend.c | 0 lib/{libsys => libc/sys}/sigtimedwait.c | 0 lib/{libsys => libc/sys}/sigwait.c | 0 lib/{libsys => libc/sys}/sigwaitinfo.c | 0 lib/{libsys => libc/sys}/stat.c | 0 lib/{libsys => libc/sys}/swapcontext.c | 0 lib/{libsys => libc/sys}/vadvise.c | 0 lib/{libsys => libc/sys}/wait.c | 0 lib/{libsys => libc/sys}/wait3.c | 0 lib/{libsys => libc/sys}/wait4.c | 0 lib/{libsys => libc/sys}/wait6.c | 0 lib/{libsys => libc/sys}/waitid.c | 0 lib/{libsys => libc/sys}/waitpid.c | 0 lib/{libsys => libc/sys}/write.c | 0 lib/{libsys => libc/sys}/writev.c | 0 lib/libsys/Makefile.sys | 16 ------- lib/libsys/Symbol.sys.map | 50 -------------------- lib/libsys/amd64/Symbol.sys.map | 8 ---- lib/libsys/arm/Symbol.sys.map | 7 --- lib/libsys/i386/Symbol.sys.map | 3 -- lib/libsys/powerpc/Symbol.sys.map | 4 -- lib/libsys/powerpc64/Symbol.sys.map | 4 -- 72 files changed, 125 insertions(+), 94 deletions(-) diff --git a/lib/libc/Makefile b/lib/libc/Makefile index aa6a737002c4..674986a7e065 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -122,8 +122,7 @@ NOASM= .include "${LIBC_SRCTOP}/stdlib/Makefile.inc" .include "${LIBC_SRCTOP}/stdtime/Makefile.inc" .include "${LIBC_SRCTOP}/string/Makefile.inc" -SHARED_CFLAGS+= -D'_SYSCALL_BODY(name)=' -.include "${LIBSYS_SRCTOP}/Makefile.sys" +.include "${LIBC_SRCTOP}/sys/Makefile.inc" .include "${LIBC_SRCTOP}/secure/Makefile.inc" .include "${LIBC_SRCTOP}/rpc/Makefile.inc" .include "${LIBC_SRCTOP}/uuid/Makefile.inc" diff --git a/lib/libc/amd64/Symbol.map b/lib/libc/amd64/Symbol.map index 2fc723102f90..36f54de24fbd 100644 --- a/lib/libc/amd64/Symbol.map +++ b/lib/libc/amd64/Symbol.map @@ -6,6 +6,7 @@ FBSD_1.0 { .mcount; __flt_rounds; + brk; fpgetmask; fpgetprec; fpgetround; @@ -13,6 +14,7 @@ FBSD_1.0 { fpsetmask; fpsetprec; fpsetround; + sbrk; }; /* @@ -26,4 +28,5 @@ FBSDprivate_1.0 { __signalcontext; signalcontext; __siglongjmp; + _brk; }; diff --git a/lib/libc/arm/Symbol.map b/lib/libc/arm/Symbol.map index ac5a7184b2a1..d8a62c367514 100644 --- a/lib/libc/arm/Symbol.map +++ b/lib/libc/arm/Symbol.map @@ -6,6 +6,8 @@ FBSD_1.0 { __mcount; alloca; + brk; + sbrk; }; FBSD_1.3 { @@ -23,6 +25,7 @@ FBSD_1.6 { }; FBSDprivate_1.0 { + _brk; __aeabi_read_tp; ___longjmp; __longjmp; diff --git a/lib/libc/i386/Symbol.map b/lib/libc/i386/Symbol.map index 2278db54c583..d7961009417e 100644 --- a/lib/libc/i386/Symbol.map +++ b/lib/libc/i386/Symbol.map @@ -5,8 +5,10 @@ */ FBSD_1.0 { .mcount; + brk; __flt_rounds; ___tls_get_addr; + sbrk; }; FBSDprivate_1.0 { @@ -15,4 +17,5 @@ FBSDprivate_1.0 { __signalcontext; signalcontext; __siglongjmp; + _brk; }; diff --git a/lib/libc/powerpc/Symbol.map b/lib/libc/powerpc/Symbol.map index 0996b79369f3..f836a08ae0d4 100644 --- a/lib/libc/powerpc/Symbol.map +++ b/lib/libc/powerpc/Symbol.map @@ -6,11 +6,13 @@ FBSD_1.0 { _mcount; __flt_rounds; + brk; fpgetmask; fpgetround; fpgetsticky; fpsetmask; fpsetround; + sbrk; }; FBSD_1.3 { diff --git a/lib/libc/powerpc64/Symbol.map b/lib/libc/powerpc64/Symbol.map index edccb69e960b..62f20e7f352c 100644 --- a/lib/libc/powerpc64/Symbol.map +++ b/lib/libc/powerpc64/Symbol.map @@ -6,9 +6,11 @@ FBSD_1.0 { _mcount; __flt_rounds; + brk; fpgetmask; fpgetround; fpgetsticky; fpsetmask; fpsetround; + sbrk; }; diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc new file mode 100644 index 000000000000..ee761ce5ff55 --- /dev/null +++ b/lib/libc/sys/Makefile.inc @@ -0,0 +1,38 @@ +# libc-specific portion of the system call interface + +.PATH: ${LIBC_SRCTOP}/sys + +# Most of the implementation is shared with libsys: +.include "${LIBSYS_SRCTOP}/Makefile.sys" + +# emit empty assembly stubs for syscalls in dynamic libc +SHARED_CFLAGS+= -D'_SYSCALL_BODY(name)=' + +SYM_MAPS+= ${LIBC_SRCTOP}/sys/Symbol.map + +# Add the interposer wrappers +SRCS+= ${INTERPOSED:S/$/.c/} + +# Pseudo system calls implemented atop other interfaces. +SRCS+= \ + POSIX2x_Fork.c \ + brk.c \ + closefrom.c \ + compat-stub.c \ + creat.c \ + getdents.c \ + lockf.c \ + lstat.c \ + mknod.c \ + pipe.c \ + recv.c \ + recvmmsg.c \ + send.c \ + sendmmsg.c \ + shm_open.c \ + stat.c \ + vadvise.c \ + wait.c \ + wait3.c \ + waitid.c \ + waitpid.c diff --git a/lib/libsys/POSIX2x_Fork.c b/lib/libc/sys/POSIX2x_Fork.c similarity index 100% rename from lib/libsys/POSIX2x_Fork.c rename to lib/libc/sys/POSIX2x_Fork.c diff --git a/lib/libc/sys/Symbol.map b/lib/libc/sys/Symbol.map new file mode 100644 index 000000000000..32b1b0ecee05 --- /dev/null +++ b/lib/libc/sys/Symbol.map @@ -0,0 +1,73 @@ +FBSD_1.0 { + accept; + aio_suspend; + close; + connect; + fcntl; + fork; + fsync; + msync; + nanosleep; + open; + pipe; + poll; + pselect; + ptrace; + read; + readv; + recvfrom; + recvmsg; + select; + sendmsg; + sendto; + shm_open; + sigaction; + sigprocmask; + sigsuspend; + sigtimedwait; + sigwait; + sigwaitinfo; + vadvise; + wait4; + write; + writev; +}; + +FBSD_1.1 { + closefrom; +}; + +FBSD_1.2 { + pdfork; +}; + +FBSD_1.3 { + accept4; + wait6; +}; + +FBSD_1.4 { + ppoll; + numa_setaffinity; + numa_getaffinity; + sendmmsg; + recvmmsg; +}; + +FBSD_1.5 { + clock_nanosleep; + fdatasync; + getdents; + kevent; + lstat; + mknod; + stat; +}; + +FBSD_1.6 { + shm_create_largepage; +}; + +FBSD_1.7 { + _Fork; +}; diff --git a/lib/libsys/accept.c b/lib/libc/sys/accept.c similarity index 100% rename from lib/libsys/accept.c rename to lib/libc/sys/accept.c diff --git a/lib/libsys/accept4.c b/lib/libc/sys/accept4.c similarity index 100% rename from lib/libsys/accept4.c rename to lib/libc/sys/accept4.c diff --git a/lib/libsys/aio_suspend.c b/lib/libc/sys/aio_suspend.c similarity index 100% rename from lib/libsys/aio_suspend.c rename to lib/libc/sys/aio_suspend.c diff --git a/lib/libsys/brk.c b/lib/libc/sys/brk.c similarity index 100% rename from lib/libsys/brk.c rename to lib/libc/sys/brk.c diff --git a/lib/libsys/clock_nanosleep.c b/lib/libc/sys/clock_nanosleep.c similarity index 100% rename from lib/libsys/clock_nanosleep.c rename to lib/libc/sys/clock_nanosleep.c diff --git a/lib/libsys/close.c b/lib/libc/sys/close.c similarity index 100% rename from lib/libsys/close.c rename to lib/libc/sys/close.c diff --git a/lib/libsys/closefrom.c b/lib/libc/sys/closefrom.c similarity index 100% rename from lib/libsys/closefrom.c rename to lib/libc/sys/closefrom.c diff --git a/lib/libsys/compat-stub.c b/lib/libc/sys/compat-stub.c similarity index 100% rename from lib/libsys/compat-stub.c rename to lib/libc/sys/compat-stub.c diff --git a/lib/libsys/connect.c b/lib/libc/sys/connect.c similarity index 100% rename from lib/libsys/connect.c rename to lib/libc/sys/connect.c diff --git a/lib/libsys/creat.c b/lib/libc/sys/creat.c similarity index 100% rename from lib/libsys/creat.c rename to lib/libc/sys/creat.c diff --git a/lib/libsys/fcntl.c b/lib/libc/sys/fcntl.c similarity index 100% rename from lib/libsys/fcntl.c rename to lib/libc/sys/fcntl.c diff --git a/lib/libsys/fdatasync.c b/lib/libc/sys/fdatasync.c similarity index 100% rename from lib/libsys/fdatasync.c rename to lib/libc/sys/fdatasync.c diff --git a/lib/libsys/fork.c b/lib/libc/sys/fork.c similarity index 100% rename from lib/libsys/fork.c rename to lib/libc/sys/fork.c diff --git a/lib/libsys/fsync.c b/lib/libc/sys/fsync.c similarity index 100% rename from lib/libsys/fsync.c rename to lib/libc/sys/fsync.c diff --git a/lib/libsys/getdents.c b/lib/libc/sys/getdents.c similarity index 100% rename from lib/libsys/getdents.c rename to lib/libc/sys/getdents.c diff --git a/lib/libsys/kevent.c b/lib/libc/sys/kevent.c similarity index 100% rename from lib/libsys/kevent.c rename to lib/libc/sys/kevent.c diff --git a/lib/libsys/lockf.c b/lib/libc/sys/lockf.c similarity index 100% rename from lib/libsys/lockf.c rename to lib/libc/sys/lockf.c diff --git a/lib/libsys/lstat.c b/lib/libc/sys/lstat.c similarity index 100% rename from lib/libsys/lstat.c rename to lib/libc/sys/lstat.c diff --git a/lib/libsys/mknod.c b/lib/libc/sys/mknod.c similarity index 100% rename from lib/libsys/mknod.c rename to lib/libc/sys/mknod.c diff --git a/lib/libsys/msync.c b/lib/libc/sys/msync.c similarity index 100% rename from lib/libsys/msync.c rename to lib/libc/sys/msync.c diff --git a/lib/libsys/nanosleep.c b/lib/libc/sys/nanosleep.c similarity index 100% rename from lib/libsys/nanosleep.c rename to lib/libc/sys/nanosleep.c diff --git a/lib/libsys/open.c b/lib/libc/sys/open.c similarity index 100% rename from lib/libsys/open.c rename to lib/libc/sys/open.c diff --git a/lib/libsys/openat.c b/lib/libc/sys/openat.c similarity index 100% rename from lib/libsys/openat.c rename to lib/libc/sys/openat.c diff --git a/lib/libsys/pdfork.c b/lib/libc/sys/pdfork.c similarity index 100% rename from lib/libsys/pdfork.c rename to lib/libc/sys/pdfork.c diff --git a/lib/libsys/pipe.c b/lib/libc/sys/pipe.c similarity index 100% rename from lib/libsys/pipe.c rename to lib/libc/sys/pipe.c diff --git a/lib/libsys/poll.c b/lib/libc/sys/poll.c similarity index 100% rename from lib/libsys/poll.c rename to lib/libc/sys/poll.c diff --git a/lib/libsys/ppoll.c b/lib/libc/sys/ppoll.c similarity index 100% rename from lib/libsys/ppoll.c rename to lib/libc/sys/ppoll.c diff --git a/lib/libsys/pselect.c b/lib/libc/sys/pselect.c similarity index 100% rename from lib/libsys/pselect.c rename to lib/libc/sys/pselect.c diff --git a/lib/libsys/read.c b/lib/libc/sys/read.c similarity index 100% rename from lib/libsys/read.c rename to lib/libc/sys/read.c diff --git a/lib/libsys/readv.c b/lib/libc/sys/readv.c similarity index 100% rename from lib/libsys/readv.c rename to lib/libc/sys/readv.c diff --git a/lib/libsys/recv.c b/lib/libc/sys/recv.c similarity index 100% rename from lib/libsys/recv.c rename to lib/libc/sys/recv.c diff --git a/lib/libsys/recvfrom.c b/lib/libc/sys/recvfrom.c similarity index 100% rename from lib/libsys/recvfrom.c rename to lib/libc/sys/recvfrom.c diff --git a/lib/libsys/recvmsg.c b/lib/libc/sys/recvmsg.c similarity index 100% rename from lib/libsys/recvmsg.c rename to lib/libc/sys/recvmsg.c diff --git a/lib/libsys/select.c b/lib/libc/sys/select.c similarity index 100% rename from lib/libsys/select.c rename to lib/libc/sys/select.c diff --git a/lib/libsys/send.c b/lib/libc/sys/send.c similarity index 100% rename from lib/libsys/send.c rename to lib/libc/sys/send.c diff --git a/lib/libsys/sendmsg.c b/lib/libc/sys/sendmsg.c similarity index 100% rename from lib/libsys/sendmsg.c rename to lib/libc/sys/sendmsg.c diff --git a/lib/libsys/sendto.c b/lib/libc/sys/sendto.c similarity index 100% rename from lib/libsys/sendto.c rename to lib/libc/sys/sendto.c diff --git a/lib/libsys/setcontext.c b/lib/libc/sys/setcontext.c similarity index 100% rename from lib/libsys/setcontext.c rename to lib/libc/sys/setcontext.c diff --git a/lib/libsys/shm_open.c b/lib/libc/sys/shm_open.c similarity index 100% rename from lib/libsys/shm_open.c rename to lib/libc/sys/shm_open.c diff --git a/lib/libsys/sigaction.c b/lib/libc/sys/sigaction.c similarity index 100% rename from lib/libsys/sigaction.c rename to lib/libc/sys/sigaction.c diff --git a/lib/libsys/sigprocmask.c b/lib/libc/sys/sigprocmask.c similarity index 100% rename from lib/libsys/sigprocmask.c rename to lib/libc/sys/sigprocmask.c diff --git a/lib/libsys/sigsuspend.c b/lib/libc/sys/sigsuspend.c similarity index 100% rename from lib/libsys/sigsuspend.c rename to lib/libc/sys/sigsuspend.c diff --git a/lib/libsys/sigtimedwait.c b/lib/libc/sys/sigtimedwait.c similarity index 100% rename from lib/libsys/sigtimedwait.c rename to lib/libc/sys/sigtimedwait.c diff --git a/lib/libsys/sigwait.c b/lib/libc/sys/sigwait.c similarity index 100% rename from lib/libsys/sigwait.c rename to lib/libc/sys/sigwait.c diff --git a/lib/libsys/sigwaitinfo.c b/lib/libc/sys/sigwaitinfo.c similarity index 100% rename from lib/libsys/sigwaitinfo.c rename to lib/libc/sys/sigwaitinfo.c diff --git a/lib/libsys/stat.c b/lib/libc/sys/stat.c similarity index 100% rename from lib/libsys/stat.c rename to lib/libc/sys/stat.c diff --git a/lib/libsys/swapcontext.c b/lib/libc/sys/swapcontext.c similarity index 100% rename from lib/libsys/swapcontext.c rename to lib/libc/sys/swapcontext.c diff --git a/lib/libsys/vadvise.c b/lib/libc/sys/vadvise.c similarity index 100% rename from lib/libsys/vadvise.c rename to lib/libc/sys/vadvise.c diff --git a/lib/libsys/wait.c b/lib/libc/sys/wait.c similarity index 100% rename from lib/libsys/wait.c rename to lib/libc/sys/wait.c diff --git a/lib/libsys/wait3.c b/lib/libc/sys/wait3.c similarity index 100% rename from lib/libsys/wait3.c rename to lib/libc/sys/wait3.c diff --git a/lib/libsys/wait4.c b/lib/libc/sys/wait4.c similarity index 100% rename from lib/libsys/wait4.c rename to lib/libc/sys/wait4.c diff --git a/lib/libsys/wait6.c b/lib/libc/sys/wait6.c similarity index 100% rename from lib/libsys/wait6.c rename to lib/libc/sys/wait6.c diff --git a/lib/libsys/waitid.c b/lib/libc/sys/waitid.c similarity index 100% rename from lib/libsys/waitid.c rename to lib/libc/sys/waitid.c diff --git a/lib/libsys/waitpid.c b/lib/libc/sys/waitpid.c similarity index 100% rename from lib/libsys/waitpid.c rename to lib/libc/sys/waitpid.c diff --git a/lib/libsys/write.c b/lib/libc/sys/write.c similarity index 100% rename from lib/libsys/write.c rename to lib/libc/sys/write.c diff --git a/lib/libsys/writev.c b/lib/libc/sys/writev.c similarity index 100% rename from lib/libsys/writev.c rename to lib/libc/sys/writev.c diff --git a/lib/libsys/Makefile.sys b/lib/libsys/Makefile.sys index e798a94e4ae0..98a9688e58a1 100644 --- a/lib/libsys/Makefile.sys +++ b/lib/libsys/Makefile.sys @@ -40,21 +40,6 @@ SRCS+= \ interposing_table.c \ libsys_sigwait.c -SRCS+= getdents.c lstat.c mknod.c stat.c - -SRCS+= creat.c -SRCS+= lockf.c wait.c wait3.c waitpid.c waitid.c -SRCS+= recv.c recvmmsg.c send.c sendmmsg.c - -SRCS+= brk.c -SRCS+= closefrom.c -SRCS+= pipe.c -SRCS+= shm_open.c -SRCS+= vadvise.c -SRCS+= POSIX2x_Fork.c - -SRCS+= compat-stub.c - .if ${LIB} == "c" # Trapping stubs in dynamic libc to be filtered by libsys. SOBJS+= libc_stubs.pico @@ -113,7 +98,6 @@ INTERPOSED = \ write \ writev -SRCS+= ${INTERPOSED:S/$/.c/} PSEUDO+= ${INTERPOSED} # Add machine dependent asm sources: diff --git a/lib/libsys/Symbol.sys.map b/lib/libsys/Symbol.sys.map index fa27dc95aea4..8d68d23686a8 100644 --- a/lib/libsys/Symbol.sys.map +++ b/lib/libsys/Symbol.sys.map @@ -33,7 +33,6 @@ FBSD_1.0 { _exit; _umtx_op; abort2; - accept; access; acct; adjtime; @@ -42,7 +41,6 @@ FBSD_1.0 { aio_fsync; aio_read; aio_return; - aio_suspend; aio_waitcomplete; aio_write; audit; @@ -57,8 +55,6 @@ FBSD_1.0 { clock_getres; clock_gettime; clock_settime; - close; - connect; dup; dup2; eaccess; @@ -81,12 +77,9 @@ FBSD_1.0 { fchflags; fchmod; fchown; - fcntl; fhopen; flock; - fork; fpathconf; - fsync; futimes; getaudit; getaudit_addr; @@ -173,32 +166,21 @@ FBSD_1.0 { msgrcv; msgsnd; msgsys; - msync; munlock; munlockall; munmap; - nanosleep; nfssvc; nmount; ntp_adjtime; ntp_gettime; - open; pathconf; - pipe; - poll; posix_openpt; preadv; profil; - pselect; - ptrace; pwritev; quotactl; - read; readlink; - readv; reboot; - recvfrom; - recvmsg; rename; revoke; rfork; @@ -213,13 +195,10 @@ FBSD_1.0 { sched_setparam; sched_setscheduler; sched_yield; - select; semget; semop; semsys; sendfile; - sendmsg; - sendto; setaudit; setaudit_addr; setauid; @@ -240,23 +219,16 @@ FBSD_1.0 { setsockopt; settimeofday; setuid; - shm_open; shm_unlink; shmat; shmdt; shmget; shmsys; shutdown; - sigaction; sigaltstack; sigpending; - sigprocmask; sigqueue; sigreturn; - sigsuspend; - sigtimedwait; - sigwait; - sigwaitinfo; socket; socketpair; swapon; @@ -285,11 +257,7 @@ FBSD_1.0 { utimes; utrace; uuidgen; - vadvise; vfork; - wait4; - write; - writev; __error; ftruncate; @@ -302,7 +270,6 @@ FBSD_1.0 { FBSD_1.1 { __semctl; - closefrom; cpuset; cpuset_getid; cpuset_setid; @@ -334,7 +301,6 @@ FBSD_1.2 { cap_getmode; getloginclass; getpagesizes; - pdfork; pdgetpid; pdkill; posix_fallocate; @@ -347,7 +313,6 @@ FBSD_1.2 { }; FBSD_1.3 { - accept4; aio_mlock; bindat; cap_fcntls_get; @@ -365,37 +330,24 @@ FBSD_1.3 { pipe2; posix_fadvise; procctl; - wait6; }; FBSD_1.4 { futimens; - ppoll; utimensat; - numa_setaffinity; - numa_getaffinity; - sendmmsg; - recvmmsg; }; FBSD_1.5 { - clock_nanosleep; elf_aux_info; - fdatasync; fhstat; fhstatfs; fstat; fstatat; fstatfs; - getdents; getdirentries; getfsstat; getrandom; - kevent; - lstat; - mknod; mknodat; - stat; statfs; cpuset_getdomain; cpuset_setdomain; @@ -412,12 +364,10 @@ FBSD_1.6 { fhreadlink; getfhat; funlinkat; - shm_create_largepage; shm_rename; }; FBSD_1.7 { - _Fork; fspacectl; kqueuex; membarrier; diff --git a/lib/libsys/amd64/Symbol.sys.map b/lib/libsys/amd64/Symbol.sys.map index 5e0714aef35d..5f463c85f872 100644 --- a/lib/libsys/amd64/Symbol.sys.map +++ b/lib/libsys/amd64/Symbol.sys.map @@ -4,8 +4,6 @@ FBSD_1.0 { amd64_get_gsbase; amd64_set_fsbase; amd64_set_gsbase; - brk; - sbrk; }; FBSD_1.6 { @@ -15,12 +13,6 @@ FBSD_1.6 { x86_pkru_unprotect_range; }; -/* - * - * FreeBSD private ABI - * - */ FBSDprivate_1.0 { - _brk; _vfork; }; diff --git a/lib/libsys/arm/Symbol.sys.map b/lib/libsys/arm/Symbol.sys.map index 179889b60832..a9445ae7ba23 100644 --- a/lib/libsys/arm/Symbol.sys.map +++ b/lib/libsys/arm/Symbol.sys.map @@ -1,10 +1,3 @@ -FBSD_1.0 { - brk; - sbrk; -}; - FBSDprivate_1.0 { _vfork; - _brk; - _sbrk; }; diff --git a/lib/libsys/i386/Symbol.sys.map b/lib/libsys/i386/Symbol.sys.map index 7d8c4ef61c11..303804935435 100644 --- a/lib/libsys/i386/Symbol.sys.map +++ b/lib/libsys/i386/Symbol.sys.map @@ -1,6 +1,5 @@ FBSD_1.0 { rfork_thread; - brk; i386_clr_watch; i386_get_fsbase; i386_get_gsbase; @@ -12,7 +11,6 @@ FBSD_1.0 { i386_set_ldt; i386_set_watch; i386_vm86; - sbrk; }; FBSD_1.6 { @@ -24,5 +22,4 @@ FBSD_1.6 { FBSDprivate_1.0 { _vfork; - _brk; }; diff --git a/lib/libsys/powerpc/Symbol.sys.map b/lib/libsys/powerpc/Symbol.sys.map deleted file mode 100644 index f241c4ed0984..000000000000 --- a/lib/libsys/powerpc/Symbol.sys.map +++ /dev/null @@ -1,4 +0,0 @@ -FBSD_1.0 { - brk; - sbrk; -}; diff --git a/lib/libsys/powerpc64/Symbol.sys.map b/lib/libsys/powerpc64/Symbol.sys.map deleted file mode 100644 index f241c4ed0984..000000000000 --- a/lib/libsys/powerpc64/Symbol.sys.map +++ /dev/null @@ -1,4 +0,0 @@ -FBSD_1.0 { - brk; - sbrk; -};