#define __need_NULL
#include <stddef.h>
#include <sys/synch.h>
-#include <synch_priv.h>
+#include <synchP.h>
/* Mutex type. */
#include <sys/stack.h>
#include <sys/regset.h>
#include <inline-syscall.h>
-#include <sched_priv.h>
+#include <schedP.h>
#include <createthread_arch.c>
DECLARE_INLINE_SYSCALL (int, lwp_create, ucontext_t *ucp, int flags,
#include <errno.h>
#include <pthreadP.h>
-#include <synch_priv.h>
+#include <synchP.h>
#include <sys/synch.h>
#include <stdbool.h>
#include <assert.h>
#include <pthreadP.h>
#include <synch.h>
#include <errno.h>
-#include <synch_priv.h>
+#include <synchP.h>
int mutex_destroy (mutex)
#include <synch.h>
#include <errno.h>
#include <time.h>
-#include <synch_priv.h>
+#include <synchP.h>
#include <abstime-to-reltime.h>
DECLARE_INLINE_SYSCALL (int, lwp_mutex_timedlock, mutex_t *lp,
#include <pthreadP.h>
#include <synch.h>
#include <errno.h>
-#include <synch_priv.h>
+#include <synchP.h>
DECLARE_INLINE_SYSCALL (int, lwp_mutex_trylock, mutex_t *lp);
#include <pthreadP.h>
#include <synch.h>
#include <errno.h>
-#include <synch_priv.h>
+#include <synchP.h>
DECLARE_INLINE_SYSCALL (int, lwp_mutex_unlock, mutex_t *lp);
#include <unistd.h>
#include <errno.h>
#include <inline-syscall.h>
-#include <synch_priv.h>
+#include <synchP.h>
#include <synch.h>
+#include <schedP.h>
/* These are the result of the macro expansion of INTERNAL_SYSCALL. */
/* These are used by the "real" associated functions. */
-#include <sched_priv.h>
-
static inline int __pthread_setschedparam_internal (pthread_t threadid,
int policy, const struct sched_param *param)
{
#include <pthreadP.h>
#include <string.h>
#include <sys/synch.h>
-#include <synch_priv.h>
+#include <synchP.h>
static const struct pthread_barrierattr default_attr =
#include <pthreadP.h>
#include <string.h>
#include <sys/synch.h>
-#include <synch_priv.h>
+#include <synchP.h>
static const struct pthread_condattr default_attr =
{
#include <string.h>
#include <pthreadP.h>
-#include <synch_priv.h>
+#include <synchP.h>
int
#include <string.h>
#include <pthreadP.h>
#include <sys/synch.h>
-#include <synch_priv.h>
+#include <synchP.h>
static const struct pthread_mutexattr default_attr =
{
#include "pthreadP.h"
#include <string.h>
#include <sys/synch.h>
-#include <synch_priv.h>
+#include <synchP.h>
static const struct pthread_rwlockattr default_attr =
#include <pthreadP.h>
#include <string.h>
#include <synch.h>
-#include <synch_priv.h>
+#include <synchP.h>
int rwlock_init (rwlock, type, arg)
#include <semaphore.h>
#include "semaphoreP.h"
#include <sys/synch.h>
-#include <synch_priv.h>
+#include <synchP.h>
int
--- /dev/null
+/* Copyright (C) 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Bartley <dtbartle@csclub.uwaterloo.ca>, 2008.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SOCKET_PRIV_H
+#define _SOCKET_PRIV_H
+
+#include <pthreadP.h>
+#include <atomic.h>
+
+/* Helper code to handle MSG_NOSIGNAL. */
+
+#define SIGPIPE_DISABLE_DEFINE
+
+#define SIGPIPE_DISABLE \
+ do { \
+ atomic_increment (&THREAD_SELF->sigpipe_disabled); \
+ } while (0);
+
+#define SIGPIPE_ENABLE \
+ do { \
+ atomic_decrement (&THREAD_SELF->sigpipe_disabled); \
+ } while (0);
+
+#define SIGPIPE_IS_DISABLED \
+ (THREAD_GETMEM (THREAD_SELF, sigpipe_disabled) != 0)
+
+#endif /* _SOCKET_PRIV_H */
+++ /dev/null
-/* Copyright (C) 2008 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by David Bartley <dtbartle@csclub.uwaterloo.ca>, 2008.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _SOCKET_PRIV_H
-#define _SOCKET_PRIV_H
-
-#include <pthreadP.h>
-#include <atomic.h>
-
-/* Helper code to handle MSG_NOSIGNAL. */
-
-#define SIGPIPE_DISABLE_DEFINE
-
-#define SIGPIPE_DISABLE \
- do { \
- atomic_increment (&THREAD_SELF->sigpipe_disabled); \
- } while (0);
-
-#define SIGPIPE_ENABLE \
- do { \
- atomic_decrement (&THREAD_SELF->sigpipe_disabled); \
- } while (0);
-
-#define SIGPIPE_IS_DISABLED \
- (THREAD_GETMEM (THREAD_SELF, sigpipe_disabled) != 0)
-
-#endif /* _SOCKET_PRIV_H */
--- /dev/null
+/* Copyright (C) 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Bartley <dtbartle@csclub.uwaterloo.ca>, 2008.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYNCH_PRIV_H
+#define _SYNCH_PRIV_H
+
+/* mutex helper macros */
+#define mutex_type flags.mbcp_type_un.mtype_rcount.count_type1
+#define mutex_magic flags.magic
+#define mutex_flag flags.flag1
+#define mutex_ceiling flags.ceiling
+#define mutex_rcount flags.mbcp_type_un.mtype_rcount.count_type2
+#define mutex_owner data.data32.owner
+#define mutex_lockword32 lock.lock32.lockword
+#define mutex_lockword64 lock.owner64
+#define mutex_lockbyte lock.lock64.pad[7]
+#define mutex_waiters lock.lock64.pad[6]
+#define mutex_cond_waiters data.data32.cond_waiters
+#define mutex_ownerpid lock.lock32.ownerpid
+#define RECURSION_MAX 255 /* UCHAR_MAX */
+#define LOCKBYTE_SET 0x01
+#define LOCKBYTE_UNSET 0x00
+#define LOCKWORD32_SET_NO_WAITERS 0x01000000
+#define LOCKWORD32_UNSET_NO_WAITERS 0x00000000
+#define LOCKWORD64_SET_NO_WAITERS 0x0100000000000000
+#define LOCKWORD64_UNSET_NO_WAITERS 0x0000000000000000
+#define MUTEX_OWNERPID_SHIFT 0
+
+/* condition variable helper macros */
+#define cond_type flags.type
+#define cond_magic flags.magic
+#define cond_clockid flags.flag[1]
+#define cond_waiters_user flags.flag[2]
+#define cond_waiters_kernel flags.flag[3]
+
+/* semaphore helper macros */
+#define sema_count count
+#define sema_type type
+#define sema_waiters flags[7]
+
+#endif /* _SYNCH_PRIV_H */
+++ /dev/null
-/* Copyright (C) 2008 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by David Bartley <dtbartle@csclub.uwaterloo.ca>, 2008.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _SYNCH_PRIV_H
-#define _SYNCH_PRIV_H
-
-/* mutex helper macros */
-#define mutex_type flags.mbcp_type_un.mtype_rcount.count_type1
-#define mutex_magic flags.magic
-#define mutex_flag flags.flag1
-#define mutex_ceiling flags.ceiling
-#define mutex_rcount flags.mbcp_type_un.mtype_rcount.count_type2
-#define mutex_owner data.data32.owner
-#define mutex_lockword32 lock.lock32.lockword
-#define mutex_lockword64 lock.owner64
-#define mutex_lockbyte lock.lock64.pad[7]
-#define mutex_waiters lock.lock64.pad[6]
-#define mutex_cond_waiters data.data32.cond_waiters
-#define mutex_ownerpid lock.lock32.ownerpid
-#define RECURSION_MAX 255 /* UCHAR_MAX */
-#define LOCKBYTE_SET 0x01
-#define LOCKBYTE_UNSET 0x00
-#define LOCKWORD32_SET_NO_WAITERS 0x01000000
-#define LOCKWORD32_UNSET_NO_WAITERS 0x00000000
-#define LOCKWORD64_SET_NO_WAITERS 0x0100000000000000
-#define LOCKWORD64_UNSET_NO_WAITERS 0x0000000000000000
-#define MUTEX_OWNERPID_SHIFT 0
-
-/* condition variable helper macros */
-#define cond_type flags.type
-#define cond_magic flags.magic
-#define cond_clockid flags.flag[1]
-#define cond_waiters_user flags.flag[2]
-#define cond_waiters_kernel flags.flag[3]
-
-/* semaphore helper macros */
-#define sema_count count
-#define sema_type type
-#define sema_waiters flags[7]
-
-#endif /* _SYNCH_PRIV_H */
ifeq ($(subdir),misc)
sysdep_routines += gethrtime mount umount umount2 systeminfo resolvepath \
getpagesizes memcntl meminfo uadmin getpflags setpflags issetugid ucred \
- priv_priv processor_bind processor_info p_online pset_create pset_destroy \
+ privP processor_bind processor_info p_online pset_create pset_destroy \
pset_assign pset_info pset_bind pset_getloadavg pset_list pset_setattr \
pset_getattr swapctl getustack setustack gethrvtime uucopy uucopystr \
zone_add_datalink zone_boot zone_check_datalink zone_destroy zone_enter \
sysdep_routines += sys_getdents sys_getdents64
endif
ifeq ($(subdir),posix)
-sysdep_routines += exit-thread sched_priv
+sysdep_routines += exit-thread schedP
endif
ifeq ($(subdir),resource)
sysdep_routines += priocntl getvmusage
ifeq ($(subdir),nptl)
libpthread-sysdep_routines += sys_fcntl sys_send sys_sendmsg sys_sendto \
sys_accept sys_connect sys_recvmsg sys_fdsync sys_open sys_open64 \
- sys_sigaction sys_priocntlsys sched_priv priocntl syscall
+ sys_sigaction sys_priocntlsys schedP priocntl syscall
endif
CFLAGS-accept.c = -fexceptions -fasynchronous-unwind-tables
#include <sys/priocntl.h>
#include <limits.h>
#include <errno.h>
-#include <priority_priv.h>
+#include <priorityP.h>
int
getpriority (enum __priority_which which, id_t who)
#include <sysdeps/unix/i386/sysdep.h>
#include <bp-sym.h>
#include <bp-asm.h>
-#include <syscall_priv.h>
+#include <syscallP.h>
/* XXX: This needs to come before #include <tls.h>. */
--- /dev/null
+ /* Copyright (C) 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Bartley <dtbartle@csclub.uwaterloo.ca>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <sys/procset.h>
+#include <sys/priocntl.h>
+
+static inline
+idtype_t __prio_to_p (enum __priority_which which)
+{
+ /* convert from PRIO_* to P_* */
+ switch(which)
+ {
+ case PRIO_PROCESS:
+ return P_PID;
+ case PRIO_PGRP:
+ return P_PGID;
+ case PRIO_USER:
+ return P_UID;
+ case PRIO_GROUP:
+ return P_GID;
+ case PRIO_SESSION:
+ return P_SID;
+ case PRIO_LWP:
+ return P_LWPID;
+ case PRIO_TASK:
+ return P_TASKID;
+ case PRIO_PROJECT:
+ return P_PROJID;
+ case PRIO_ZONE:
+ return P_ZONEID;
+ case PRIO_CONTRACT:
+ return P_CTID;
+ default:
+ __set_errno(EINVAL);
+ return -1;
+ }
+}
+++ /dev/null
- /* Copyright (C) 2008 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by David Bartley <dtbartle@csclub.uwaterloo.ca>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <sys/procset.h>
-#include <sys/priocntl.h>
-
-static inline
-idtype_t __prio_to_p (enum __priority_which which)
-{
- /* convert from PRIO_* to P_* */
- switch(which)
- {
- case PRIO_PROCESS:
- return P_PID;
- case PRIO_PGRP:
- return P_PGID;
- case PRIO_USER:
- return P_UID;
- case PRIO_GROUP:
- return P_GID;
- case PRIO_SESSION:
- return P_SID;
- case PRIO_LWP:
- return P_LWPID;
- case PRIO_TASK:
- return P_TASKID;
- case PRIO_PROJECT:
- return P_PROJID;
- case PRIO_ZONE:
- return P_ZONEID;
- case PRIO_CONTRACT:
- return P_CTID;
- default:
- __set_errno(EINVAL);
- return -1;
- }
-}
--- /dev/null
+/* Copyright (C) 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Bartley <dtbartle@csclub.uwaterloo.ca>, 2008.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <privP.h>
+#include <inline-syscall.h>
+#include <priv.h>
+#include <sys/priocntl.h>
+#include <alloca.h>
+#include <bits/libc-lock.h>
+
+DECLARE_INLINE_SYSCALL (int, privsys, int code, priv_op_t op,
+ priv_ptype_t type, void *buf, size_t bufsize, int itype);
+
+/* Docs: http://docs.sun.com/app/docs/doc/816-5168/6mbb3hrjc?a=view
+ http://docs.sun.com/app/docs/doc/816-5167/setppriv-2?a=view */
+
+__libc_lock_define (static, privimplinfo_lock);
+
+libc_freeres_ptr (static priv_impl_info_t *__info);
+
+int __getprivimplinfo_cached (priv_impl_info_t **info)
+{
+ if (__info)
+ {
+ *info = __info;
+ return 0;
+ }
+
+ __libc_lock_lock (privimplinfo_lock);
+
+ /* First call: get header. */
+ priv_impl_info_t _info;
+ int result = INLINE_SYSCALL (privsys, 6, PRIVSYS_GETIMPLINFO, 0, 0, &_info,
+ sizeof(_info), 0);
+ if (result != 0)
+ {
+ __libc_lock_unlock (privimplinfo_lock);
+ return -1;
+ }
+
+ /* Second call: alloc and get full priv_impl_info_t. */
+ size_t info_size = PRIV_IMPL_INFO_SIZE (&_info);
+ __info = malloc (info_size);
+ result = INLINE_SYSCALL (privsys, 6, PRIVSYS_GETIMPLINFO, 0, 0, __info,
+ info_size, 0);
+ if (result != 0)
+ {
+ __libc_lock_unlock (privimplinfo_lock);
+ return -1;
+ }
+
+ __libc_lock_unlock (privimplinfo_lock);
+
+ *info = __info;
+ return 0;
+}
--- /dev/null
+/* Copyright (C) 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Bartley <dtbartle@csclub.uwaterloo.ca>, 2008.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _PRIV_PRIV_H
+#define _PRIV_PRIV_H
+
+#include <priv.h>
+
+extern int __getprivimplinfo_cached (priv_impl_info_t **info);
+
+#endif /* _PRIV_PRIV_H */
+++ /dev/null
-/* Copyright (C) 2008 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by David Bartley <dtbartle@csclub.uwaterloo.ca>, 2008.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "priv_priv.h"
-#include <inline-syscall.h>
-#include <priv.h>
-#include <sys/priocntl.h>
-#include <alloca.h>
-#include <bits/libc-lock.h>
-
-DECLARE_INLINE_SYSCALL (int, privsys, int code, priv_op_t op,
- priv_ptype_t type, void *buf, size_t bufsize, int itype);
-
-/* Docs: http://docs.sun.com/app/docs/doc/816-5168/6mbb3hrjc?a=view
- http://docs.sun.com/app/docs/doc/816-5167/setppriv-2?a=view */
-
-__libc_lock_define (static, privimplinfo_lock);
-
-libc_freeres_ptr (static priv_impl_info_t *__info);
-
-int __getprivimplinfo_cached (priv_impl_info_t **info)
-{
- if (__info)
- {
- *info = __info;
- return 0;
- }
-
- __libc_lock_lock (privimplinfo_lock);
-
- /* First call: get header. */
- priv_impl_info_t _info;
- int result = INLINE_SYSCALL (privsys, 6, PRIVSYS_GETIMPLINFO, 0, 0, &_info,
- sizeof(_info), 0);
- if (result != 0)
- {
- __libc_lock_unlock (privimplinfo_lock);
- return -1;
- }
-
- /* Second call: alloc and get full priv_impl_info_t. */
- size_t info_size = PRIV_IMPL_INFO_SIZE (&_info);
- __info = malloc (info_size);
- result = INLINE_SYSCALL (privsys, 6, PRIVSYS_GETIMPLINFO, 0, 0, __info,
- info_size, 0);
- if (result != 0)
- {
- __libc_lock_unlock (privimplinfo_lock);
- return -1;
- }
-
- __libc_lock_unlock (privimplinfo_lock);
-
- *info = __info;
- return 0;
-}
+++ /dev/null
-/* Copyright (C) 2008 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by David Bartley <dtbartle@csclub.uwaterloo.ca>, 2008.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _PRIV_PRIV_H
-#define _PRIV_PRIV_H
-
-#include <priv.h>
-
-extern int __getprivimplinfo_cached (priv_impl_info_t **info);
-
-#endif /* _PRIV_PRIV_H */
--- /dev/null
+/* Copyright (C) 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Bartley <dtbartle@csclub.uwaterloo.ca>, 2008.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <inline-syscall.h>
+#include <schedP.h>
+#include <sys/priocntl.h>
+#include <bits/libc-lock.h>
+
+/* XXX: We don't deal with custom schedulers. */
+
+/* XXX: We only set sched_param.sched_priority. */
+
+/* TODO: Cleanup errno usage. */
+
+/* SCHED_SYS has cid == 0 always. */
+static pcinfo_t __sched_policies[] = {
+ {-1, "TS", {0}}, /* SCHED_OTHER */
+ {-1, "RT", {0}}, /* SCHED_FIFO */
+ {-1, "RT", {0}}, /* SCHED_RR */
+ {0, "SYS", {0}}, /* SCHED_SYS */
+ {-1, "IA", {0}}, /* SCHED_IA */
+ {-1, "FSS", {0}}, /* SCHED_FSS */
+ {-1, "FX", {0}}, /* SCHED_FX */
+};
+
+int __sched_policies_initialized = 0;
+__libc_lock_define_initialized (static, lock);
+
+int __sched_policy_to_class (int policy)
+{
+ if (policy < 0 || policy >= _SCHED_NEXT)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ __libc_lock_lock (lock);
+
+ /* Try to get cid from clname. */
+ if (__sched_policies[policy].pc_cid == -1)
+ {
+ priocntl (0, 0, PC_GETCID, &__sched_policies[policy]);
+ }
+
+ __libc_lock_unlock (lock);
+
+ return __sched_policies[policy].pc_cid;
+}
+
+int __sched_class_to_policy (int cid)
+{
+ int policy = -1;
+
+ __libc_lock_lock (lock);
+
+ for (int i = 0; i < _SCHED_NEXT; i++)
+ {
+ if (__sched_policies[i].pc_cid == -1)
+ priocntl (0, 0, PC_GETCID, &__sched_policies[i]);
+
+ if (__sched_policies[i].pc_cid == cid)
+ {
+ policy = i;
+ break;
+ }
+ }
+
+ __libc_lock_unlock (lock);
+
+ return policy;
+}
+
+int __sched_getparam_id (int idtype, id_t id, int *priority)
+{
+ pcprio_t prio;
+ prio.pc_op = PC_GETPRIO;
+ int result = priocntl (idtype, id, PC_DOPRIO, &prio);
+ if (result != 0)
+ return errno;
+
+ *priority = prio.pc_val;
+
+ return 0;
+}
+
+int __sched_setparam_id (int idtype, id_t id, int priority)
+{
+ /* We need pc_cid to be valid in the PC_SETPRIO call. */
+ pcprio_t prio;
+ prio.pc_op = PC_GETPRIO;
+ int result = priocntl (idtype, id, PC_DOPRIO, &prio);
+ if (result != 0)
+ return errno;
+
+ prio.pc_op = PC_SETPRIO;
+ prio.pc_val = priority;
+ result = priocntl (idtype, id, PC_DOPRIO, &prio);
+ if (result != 0)
+ return errno;
+
+ return 0;
+}
+
+int __sched_getscheduler_id (int idtype, id_t id, int *policy, int *priority)
+{
+ pcprio_t prio;
+ prio.pc_op = PC_GETPRIO;
+ int result = priocntl (idtype, id, PC_DOPRIO, &prio);
+ if (result != 0)
+ return errno;
+
+ if (priority)
+ *priority = prio.pc_val;
+ *policy = __sched_class_to_policy (prio.pc_cid);
+
+ return 0;
+}
+
+int __sched_setscheduler_id (int idtype, id_t id, int policy, int priority)
+{
+ pcprio_t prio;
+ prio.pc_op = PC_SETPRIO;
+ prio.pc_val = priority;
+ prio.pc_cid = __sched_policy_to_class (policy);
+ if (prio.pc_cid == -1)
+ return -1;
+
+ int result = priocntl (idtype, id, PC_DOPRIO, &prio);
+ if (result != 0)
+ return errno;
+
+ return 0;
+}
--- /dev/null
+/* Copyright (C) 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Bartley <dtbartle@csclub.uwaterloo.ca>, 2008.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sys/types.h>
+#include <sys/procset.h>
+#include <sched.h>
+
+extern int __sched_policy_to_class (int policy);
+extern int __sched_class_to_policy (int cid);
+extern int __sched_getparam_id (int idtype, id_t id, int *priority);
+extern int __sched_setparam_id (int idtype, id_t id, int priority);
+extern int __sched_getscheduler_id (int idtype, id_t id, int *policy,
+ int *priority);
+extern int __sched_setscheduler_id (int idtype, id_t id, int policy,
+ int priority);
+extern long __internal_priocntl_4 (int *errval, idtype_t idtype, id_t id,
+ int cmd, ...);
#include <sched.h>
#include <errno.h>
#include <sys/procset.h>
-#include "sched_priv.h"
+#include <schedP.h>
int
__sched_getparam (pid_t pid, struct sched_param *param)
#include <sched.h>
#include <errno.h>
#include <sys/procset.h>
-#include "sched_priv.h"
+#include <schedP.h>
int
__sched_getscheduler (pid_t pid)
02111-1307 USA. */
#include <sched.h>
-#include <sched_priv.h>
+#include <schedP.h>
#include <errno.h>
#include <sys/priocntl.h>
02111-1307 USA. */
#include <sched.h>
-#include <sched_priv.h>
+#include <schedP.h>
#include <errno.h>
#include <sys/priocntl.h>
+++ /dev/null
-/* Copyright (C) 2008 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by David Bartley <dtbartle@csclub.uwaterloo.ca>, 2008.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <inline-syscall.h>
-#include "sched_priv.h"
-#include <sys/priocntl.h>
-#include <bits/libc-lock.h>
-
-/* XXX: We don't deal with custom schedulers. */
-
-/* XXX: We only set sched_param.sched_priority. */
-
-/* TODO: Cleanup errno usage. */
-
-/* SCHED_SYS has cid == 0 always. */
-static pcinfo_t __sched_policies[] = {
- {-1, "TS", {0}}, /* SCHED_OTHER */
- {-1, "RT", {0}}, /* SCHED_FIFO */
- {-1, "RT", {0}}, /* SCHED_RR */
- {0, "SYS", {0}}, /* SCHED_SYS */
- {-1, "IA", {0}}, /* SCHED_IA */
- {-1, "FSS", {0}}, /* SCHED_FSS */
- {-1, "FX", {0}}, /* SCHED_FX */
-};
-
-int __sched_policies_initialized = 0;
-__libc_lock_define_initialized (static, lock);
-
-int __sched_policy_to_class (int policy)
-{
- if (policy < 0 || policy >= _SCHED_NEXT)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- __libc_lock_lock (lock);
-
- /* Try to get cid from clname. */
- if (__sched_policies[policy].pc_cid == -1)
- {
- priocntl (0, 0, PC_GETCID, &__sched_policies[policy]);
- }
-
- __libc_lock_unlock (lock);
-
- return __sched_policies[policy].pc_cid;
-}
-
-int __sched_class_to_policy (int cid)
-{
- int policy = -1;
-
- __libc_lock_lock (lock);
-
- for (int i = 0; i < _SCHED_NEXT; i++)
- {
- if (__sched_policies[i].pc_cid == -1)
- priocntl (0, 0, PC_GETCID, &__sched_policies[i]);
-
- if (__sched_policies[i].pc_cid == cid)
- {
- policy = i;
- break;
- }
- }
-
- __libc_lock_unlock (lock);
-
- return policy;
-}
-
-int __sched_getparam_id (int idtype, id_t id, int *priority)
-{
- pcprio_t prio;
- prio.pc_op = PC_GETPRIO;
- int result = priocntl (idtype, id, PC_DOPRIO, &prio);
- if (result != 0)
- return errno;
-
- *priority = prio.pc_val;
-
- return 0;
-}
-
-int __sched_setparam_id (int idtype, id_t id, int priority)
-{
- /* We need pc_cid to be valid in the PC_SETPRIO call. */
- pcprio_t prio;
- prio.pc_op = PC_GETPRIO;
- int result = priocntl (idtype, id, PC_DOPRIO, &prio);
- if (result != 0)
- return errno;
-
- prio.pc_op = PC_SETPRIO;
- prio.pc_val = priority;
- result = priocntl (idtype, id, PC_DOPRIO, &prio);
- if (result != 0)
- return errno;
-
- return 0;
-}
-
-int __sched_getscheduler_id (int idtype, id_t id, int *policy, int *priority)
-{
- pcprio_t prio;
- prio.pc_op = PC_GETPRIO;
- int result = priocntl (idtype, id, PC_DOPRIO, &prio);
- if (result != 0)
- return errno;
-
- if (priority)
- *priority = prio.pc_val;
- *policy = __sched_class_to_policy (prio.pc_cid);
-
- return 0;
-}
-
-int __sched_setscheduler_id (int idtype, id_t id, int policy, int priority)
-{
- pcprio_t prio;
- prio.pc_op = PC_SETPRIO;
- prio.pc_val = priority;
- prio.pc_cid = __sched_policy_to_class (policy);
- if (prio.pc_cid == -1)
- return -1;
-
- int result = priocntl (idtype, id, PC_DOPRIO, &prio);
- if (result != 0)
- return errno;
-
- return 0;
-}
+++ /dev/null
-/* Copyright (C) 2008 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by David Bartley <dtbartle@csclub.uwaterloo.ca>, 2008.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <sys/types.h>
-#include <sys/procset.h>
-#include <sched.h>
-
-extern int __sched_policy_to_class (int policy);
-extern int __sched_class_to_policy (int cid);
-extern int __sched_getparam_id (int idtype, id_t id, int *priority);
-extern int __sched_setparam_id (int idtype, id_t id, int priority);
-extern int __sched_getscheduler_id (int idtype, id_t id, int *policy,
- int *priority);
-extern int __sched_setscheduler_id (int idtype, id_t id, int policy,
- int priority);
-extern long __internal_priocntl_4 (int *errval, idtype_t idtype, id_t id,
- int cmd, ...);
#include <sched.h>
#include <errno.h>
#include <sys/procset.h>
-#include "sched_priv.h"
+#include <schedP.h>
int
__sched_setparam (pid_t pid, const struct sched_param *param)
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include "sched_priv.h"
+#include <schedP.h>
#include <errno.h>
#include <sys/priocntl.h>
#include <sched.h>
#include <sysdep-cancel.h>
#include <inline-syscall.h>
#include <sys/socket.h>
-#include <socket_priv.h>
+#include <socketP.h>
DECLARE_INLINE_SYSCALL (ssize_t, send, int s, const void *buf, size_t len,
int flags);
#include <sysdep-cancel.h>
#include <inline-syscall.h>
#include <sys/socket.h>
-#include <socket_priv.h>
+#include <socketP.h>
DECLARE_INLINE_SYSCALL (ssize_t, sendmsg, int s, const struct msghdr *msg,
int flags);
#include <sysdep-cancel.h>
#include <inline-syscall.h>
#include <sys/socket.h>
-#include <socket_priv.h>
+#include <socketP.h>
DECLARE_INLINE_SYSCALL (ssize_t, sendto, int s, const void *buf, size_t len,
int flags, __CONST_SOCKADDR_ARG to, socklen_t tolen);
#include <sys/procset.h>
#include <sys/priocntl.h>
#include <errno.h>
-#include <priority_priv.h>
+#include <priorityP.h>
int
setpriority (enum __priority_which which, id_t who, int prio)
#include <assert.h>
#include <bits/libc-lock.h>
#include <stdio.h>
-#include <socket_priv.h>
+#include <socketP.h>
static void (*sighandlers[_NSIG])(int, struct siginfo *, void *) = {0};
static sigset_t sigmasks[_NSIG];
--- /dev/null
+/* Copyright (C) 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Bartley <dtbartle@csclub.uwaterloo.ca>, 2008.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SOCKET_PRIV_H
+#define _SOCKET_PRIV_H
+
+#include <atomic.h>
+
+/* Helper code to handle MSG_NOSIGNAL. */
+
+extern unsigned int __sigpipe_disabled;
+
+#define SIGPIPE_DISABLE_DEFINE unsigned int __sigpipe_disabled = 0;
+
+#define SIGPIPE_DISABLE \
+ do { \
+ atomic_increment (&__sigpipe_disabled); \
+ } while (0);
+
+#define SIGPIPE_ENABLE \
+ do { \
+ atomic_decrement (&__sigpipe_disabled); \
+ } while (0);
+
+#define SIGPIPE_IS_DISABLE (__sigpipe_disabled != 0)
+
+#endif /* _SOCKET_PRIV_H */
+++ /dev/null
-/* Copyright (C) 2008 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by David Bartley <dtbartle@csclub.uwaterloo.ca>, 2008.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _SOCKET_PRIV_H
-#define _SOCKET_PRIV_H
-
-#include <atomic.h>
-
-/* Helper code to handle MSG_NOSIGNAL. */
-
-extern unsigned int __sigpipe_disabled;
-
-#define SIGPIPE_DISABLE_DEFINE unsigned int __sigpipe_disabled = 0;
-
-#define SIGPIPE_DISABLE \
- do { \
- atomic_increment (&__sigpipe_disabled); \
- } while (0);
-
-#define SIGPIPE_ENABLE \
- do { \
- atomic_decrement (&__sigpipe_disabled); \
- } while (0);
-
-#define SIGPIPE_IS_DISABLE (__sigpipe_disabled != 0)
-
-#endif /* _SOCKET_PRIV_H */
--- /dev/null
+/* Copyright (C) 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Bartley <dtbartle@csclub.uwaterloo.ca>, 2008.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYSCALL_PRIV_H
+#define _SYSCALL_PRIV_H
+
+/* SYS_pgrpsys */
+#define SYS_SUB_getpgrp 0
+#define SYS_SUB_setpgrp 1
+#define SYS_SUB_getsid 2
+#define SYS_SUB_setsid 3
+#define SYS_SUB_getpgid 4
+#define SYS_SUB_setpgid 5
+
+/* SYS_signal */
+#define SYS_SUB_signal 0
+#define SYS_SUB_sigset 1
+#define SYS_SUB_sighold 2
+#define SYS_SUB_sigrelse 3
+#define SYS_SUB_sigignore 4
+#define SYS_SUB_sigpause 5
+
+/* SYS_msgsys */
+#define SYS_SUB_msgget 0
+#define SYS_SUB_msgctl 1
+#define SYS_SUB_msgrcv 2
+#define SYS_SUB_msgsnd 3
+#define SYS_SUB_msgids 4
+#define SYS_SUB_msgsnap 5
+
+/* SYS_shmsys */
+#define SYS_SUB_shmat 0
+#define SYS_SUB_shmctl 1
+#define SYS_SUB_shmdt 2
+#define SYS_SUB_shmget 3
+#define SYS_SUB_shmids 4
+
+/* SYS_semsys */
+#define SYS_SUB_semctl 0
+#define SYS_SUB_semget 1
+#define SYS_SUB_semop 2
+#define SYS_SUB_semids 3
+#define SYS_SUB_semtimedop 4
+
+/* SYS_utssys */
+#define SYS_SUB_uname 0 /* obsolete */
+/* subcode 1 unused */
+#define SYS_SUB_ustat 2
+#define SYS_SUB_fusers 3
+
+/* SYS_tasksys */
+#define SYS_SUB_settaskid 0
+#define SYS_SUB_gettaskid 1
+#define SYS_SUB_getprojid 2
+
+/* SYS_exacctsys */
+#define SYS_SUB_getacct 0
+#define SYS_SUB_putacct 1
+#define SYS_SUB_wracct 2
+
+/* SYS_getpagesizes */
+#define SYS_SUB_getpagesizes 0
+#define SYS_SUB_getpagesizes2 1
+
+/* SYS_rctlsys */
+#define SYS_SUB_getrctl 0
+#define SYS_SUB_setrctl 1
+#define SYS_SUB_rctllist 2
+#define SYS_SUB_rctlctl 3
+
+/* SYS_sidsys */
+#define SYS_SUB_allocids 0
+#define SYS_SUB_idmap_reg 1
+#define SYS_SUB_idmap_unreg 2
+
+/* SYS_fsat */
+#define SYS_SUB_openat 0
+#define SYS_SUB_openat64 1
+#define SYS_SUB_fstatat64 2
+#define SYS_SUB_fstatat 3
+#define SYS_SUB_fchownat 4
+#define SYS_SUB_unlinkat 5
+#define SYS_SUB_futimesat 6
+#define SYS_SUB_renameat 7
+#define SYS_SUB_accessat 8
+#define SYS_SUB_openattrdirat 9
+
+/* SYS_lwp_park */
+#define SYS_SUB_lwp_park 0
+#define SYS_SUB_lwp_unpark 1
+#define SYS_SUB_lwp_unpark_all 2
+#define SYS_SUB_lwp_unpark_cancel 3
+#define SYS_SUB_lwp_set_park 4
+
+/* SYS_sendfilev */
+#define SYS_SUB_sendfilev 0
+#define SYS_SUB_sendfilev64 1
+
+/* SYS_privsys */
+#define SYS_SUB_setppriv 0
+#define SYS_SUB_getppriv 1
+#define SYS_SUB_getimplinfo 2
+#define SYS_SUB_setpflags 3
+#define SYS_SUB_getpflags 4
+#define SYS_SUB_issetugid 5
+
+/* SYS_ucredsys */
+#define SYS_ucred_get 0
+#define SYS_getpeerucred 1
+
+/* SYS_sigpending */
+#define SYS_SUB_sigpending 1
+#define SYS_SUB_sigfillset 2
+
+/* SYS_context */
+#define SYS_SUB_getcontext 0
+#define SYS_SUB_setcontext 1
+#define SYS_SUB_getustack 2
+#define SYS_SUB_setustack 3
+
+/* SYS_forksys */
+#define SYS_SUB_forkx 0
+#define SYS_SUB_forkallx 1
+#define SYS_SUB_vforkx 2
+
+/* SYS_coresys */
+#define SYS_SUB_core_set_options 1
+#define SYS_SUB_core_get_options 2
+#define SYS_SUB_core_set_global_path 3
+#define SYS_SUB_core_get_global_path 4
+#define SYS_SUB_core_set_process_path 5
+#define SYS_SUB_core_get_process_path 6
+#define SYS_SUB_core_set_global_content 7
+#define SYS_SUB_core_get_global_content 8
+#define SYS_SUB_core_set_process_content 9
+#define SYS_SUB_core_get_process_content 10
+#define SYS_SUB_core_set_default_path 11
+#define SYS_SUB_core_get_default_path 12
+#define SYS_SUB_core_set_default_content 13
+#define SYS_SUB_core_get_default_content 14
+
+/* SYS_lgrpsys / SYS_meminfosys */
+#define SYS_SUB_meminfo 0
+#define SYS_SUB_lgrp_generation 1
+#define SYS_SUB_lgrp_version 2
+#define SYS_SUB_lgrp_snapshot 3
+#define SYS_SUB_lgrp_affinity_set 4
+#define SYS_SUB_lgrp_affinity_get 5
+#define SYS_SYB_lgrp_latency 6
+#define SYS_SUB_lgrp_home 7
+
+/* SYS_rusagesys */
+#define SYS_SUB_getrusage 0
+#define SYS_SUB_getrusage_chld 1
+#define SYS_SUB_getrusage_lwp 2
+#define SYS_SUB_getvmusage 3
+
+/* TODO: SYS_port */
+
+/* SYS_door */
+#define SYS_SUB_door_create 0
+#define SYS_SUB_door_revoke 1
+#define SYS_SUB_door_info 2
+#define SYS_SUB_door_call 3
+#define SYS_SUB_door_return 4
+
+/* SYS_pset */
+#define SYS_SUB_pset_create 0
+#define SYS_SUB_pset_destroy 1
+#define SYS_SUB_pset_assign 2
+#define SYS_SUB_pset_info 3
+#define SYS_SUB_pset_bind 4
+#define SYS_SUB_pset_getloadavg 5
+#define SYS_SUB_pset_list 6
+#define SYS_SUB_pset_setattr 7
+#define SYS_SUB_pset_getattr 8
+#define SYS_SUB_pset_assign_forced 9
+
+/* SYS_rwlock */
+#define SYS_SUB_lwp_rwlock_rdlock 0
+#define SYS_SUB_lwp_rwlock_wrlock 1
+#define SYS_SUB_lwp_rwlock_tryrdlock 2
+#define SYS_SUB_lwp_rwlock_trywrlock 3
+#define SYS_SUB_lwp_rwlock_unlock 4
+
+/* SYS_zone */
+#define SYS_SUB_zone_create 0
+#define SYS_SUB_zone_destroy 1
+#define SYS_SUB_zone_getattr 2
+#define SYS_SUB_zone_enter 3
+#define SYS_SUB_zone_list 4
+#define SYS_SUB_zone_shutdown 5
+#define SYS_SUB_zone_lookup 6
+#define SYS_SUB_zone_boot 7
+#define SYS_SUB_zone_version 8
+#define SYS_SUB_zone_setattr 9
+#define SYS_SUB_zone_add_datalink 10
+#define SYS_SUB_zone_del_datalink 11
+#define SYS_SUB_zone_check_datalink 12
+#define SYS_SUB_zone_list_datalink 13
+
+#endif /* _SYSCALL_PRIV_H */
+++ /dev/null
-/* Copyright (C) 2008 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by David Bartley <dtbartle@csclub.uwaterloo.ca>, 2008.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _SYSCALL_PRIV_H
-#define _SYSCALL_PRIV_H
-
-/* SYS_pgrpsys */
-#define SYS_SUB_getpgrp 0
-#define SYS_SUB_setpgrp 1
-#define SYS_SUB_getsid 2
-#define SYS_SUB_setsid 3
-#define SYS_SUB_getpgid 4
-#define SYS_SUB_setpgid 5
-
-/* SYS_signal */
-#define SYS_SUB_signal 0
-#define SYS_SUB_sigset 1
-#define SYS_SUB_sighold 2
-#define SYS_SUB_sigrelse 3
-#define SYS_SUB_sigignore 4
-#define SYS_SUB_sigpause 5
-
-/* SYS_msgsys */
-#define SYS_SUB_msgget 0
-#define SYS_SUB_msgctl 1
-#define SYS_SUB_msgrcv 2
-#define SYS_SUB_msgsnd 3
-#define SYS_SUB_msgids 4
-#define SYS_SUB_msgsnap 5
-
-/* SYS_shmsys */
-#define SYS_SUB_shmat 0
-#define SYS_SUB_shmctl 1
-#define SYS_SUB_shmdt 2
-#define SYS_SUB_shmget 3
-#define SYS_SUB_shmids 4
-
-/* SYS_semsys */
-#define SYS_SUB_semctl 0
-#define SYS_SUB_semget 1
-#define SYS_SUB_semop 2
-#define SYS_SUB_semids 3
-#define SYS_SUB_semtimedop 4
-
-/* SYS_utssys */
-#define SYS_SUB_uname 0 /* obsolete */
-/* subcode 1 unused */
-#define SYS_SUB_ustat 2
-#define SYS_SUB_fusers 3
-
-/* SYS_tasksys */
-#define SYS_SUB_settaskid 0
-#define SYS_SUB_gettaskid 1
-#define SYS_SUB_getprojid 2
-
-/* SYS_exacctsys */
-#define SYS_SUB_getacct 0
-#define SYS_SUB_putacct 1
-#define SYS_SUB_wracct 2
-
-/* SYS_getpagesizes */
-#define SYS_SUB_getpagesizes 0
-#define SYS_SUB_getpagesizes2 1
-
-/* SYS_rctlsys */
-#define SYS_SUB_getrctl 0
-#define SYS_SUB_setrctl 1
-#define SYS_SUB_rctllist 2
-#define SYS_SUB_rctlctl 3
-
-/* SYS_sidsys */
-#define SYS_SUB_allocids 0
-#define SYS_SUB_idmap_reg 1
-#define SYS_SUB_idmap_unreg 2
-
-/* SYS_fsat */
-#define SYS_SUB_openat 0
-#define SYS_SUB_openat64 1
-#define SYS_SUB_fstatat64 2
-#define SYS_SUB_fstatat 3
-#define SYS_SUB_fchownat 4
-#define SYS_SUB_unlinkat 5
-#define SYS_SUB_futimesat 6
-#define SYS_SUB_renameat 7
-#define SYS_SUB_accessat 8
-#define SYS_SUB_openattrdirat 9
-
-/* SYS_lwp_park */
-#define SYS_SUB_lwp_park 0
-#define SYS_SUB_lwp_unpark 1
-#define SYS_SUB_lwp_unpark_all 2
-#define SYS_SUB_lwp_unpark_cancel 3
-#define SYS_SUB_lwp_set_park 4
-
-/* SYS_sendfilev */
-#define SYS_SUB_sendfilev 0
-#define SYS_SUB_sendfilev64 1
-
-/* SYS_privsys */
-#define SYS_SUB_setppriv 0
-#define SYS_SUB_getppriv 1
-#define SYS_SUB_getimplinfo 2
-#define SYS_SUB_setpflags 3
-#define SYS_SUB_getpflags 4
-#define SYS_SUB_issetugid 5
-
-/* SYS_ucredsys */
-#define SYS_ucred_get 0
-#define SYS_getpeerucred 1
-
-/* SYS_sigpending */
-#define SYS_SUB_sigpending 1
-#define SYS_SUB_sigfillset 2
-
-/* SYS_context */
-#define SYS_SUB_getcontext 0
-#define SYS_SUB_setcontext 1
-#define SYS_SUB_getustack 2
-#define SYS_SUB_setustack 3
-
-/* SYS_forksys */
-#define SYS_SUB_forkx 0
-#define SYS_SUB_forkallx 1
-#define SYS_SUB_vforkx 2
-
-/* SYS_coresys */
-#define SYS_SUB_core_set_options 1
-#define SYS_SUB_core_get_options 2
-#define SYS_SUB_core_set_global_path 3
-#define SYS_SUB_core_get_global_path 4
-#define SYS_SUB_core_set_process_path 5
-#define SYS_SUB_core_get_process_path 6
-#define SYS_SUB_core_set_global_content 7
-#define SYS_SUB_core_get_global_content 8
-#define SYS_SUB_core_set_process_content 9
-#define SYS_SUB_core_get_process_content 10
-#define SYS_SUB_core_set_default_path 11
-#define SYS_SUB_core_get_default_path 12
-#define SYS_SUB_core_set_default_content 13
-#define SYS_SUB_core_get_default_content 14
-
-/* SYS_lgrpsys / SYS_meminfosys */
-#define SYS_SUB_meminfo 0
-#define SYS_SUB_lgrp_generation 1
-#define SYS_SUB_lgrp_version 2
-#define SYS_SUB_lgrp_snapshot 3
-#define SYS_SUB_lgrp_affinity_set 4
-#define SYS_SUB_lgrp_affinity_get 5
-#define SYS_SYB_lgrp_latency 6
-#define SYS_SUB_lgrp_home 7
-
-/* SYS_rusagesys */
-#define SYS_SUB_getrusage 0
-#define SYS_SUB_getrusage_chld 1
-#define SYS_SUB_getrusage_lwp 2
-#define SYS_SUB_getvmusage 3
-
-/* TODO: SYS_port */
-
-/* SYS_door */
-#define SYS_SUB_door_create 0
-#define SYS_SUB_door_revoke 1
-#define SYS_SUB_door_info 2
-#define SYS_SUB_door_call 3
-#define SYS_SUB_door_return 4
-
-/* SYS_pset */
-#define SYS_SUB_pset_create 0
-#define SYS_SUB_pset_destroy 1
-#define SYS_SUB_pset_assign 2
-#define SYS_SUB_pset_info 3
-#define SYS_SUB_pset_bind 4
-#define SYS_SUB_pset_getloadavg 5
-#define SYS_SUB_pset_list 6
-#define SYS_SUB_pset_setattr 7
-#define SYS_SUB_pset_getattr 8
-#define SYS_SUB_pset_assign_forced 9
-
-/* SYS_rwlock */
-#define SYS_SUB_lwp_rwlock_rdlock 0
-#define SYS_SUB_lwp_rwlock_wrlock 1
-#define SYS_SUB_lwp_rwlock_tryrdlock 2
-#define SYS_SUB_lwp_rwlock_trywrlock 3
-#define SYS_SUB_lwp_rwlock_unlock 4
-
-/* SYS_zone */
-#define SYS_SUB_zone_create 0
-#define SYS_SUB_zone_destroy 1
-#define SYS_SUB_zone_getattr 2
-#define SYS_SUB_zone_enter 3
-#define SYS_SUB_zone_list 4
-#define SYS_SUB_zone_shutdown 5
-#define SYS_SUB_zone_lookup 6
-#define SYS_SUB_zone_boot 7
-#define SYS_SUB_zone_version 8
-#define SYS_SUB_zone_setattr 9
-#define SYS_SUB_zone_add_datalink 10
-#define SYS_SUB_zone_del_datalink 11
-#define SYS_SUB_zone_check_datalink 12
-#define SYS_SUB_zone_list_datalink 13
-
-#endif /* _SYSCALL_PRIV_H */
#include <unistd.h>
#include <ucred.h>
#include <errno.h>
-#include <ucred_priv.h>
+#include <ucredP.h>
#include <assert.h>
DECLARE_INLINE_SYSCALL (int, getpeerucred, int fd, ucred_t *ucred);
--- /dev/null
+/* Copyright (C) 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Bartley <dtbartle@csclub.uwaterloo.ca>, 2008.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _UCRED_PRIV_H
+#define _UCRED_PRIV_H
+
+#include <sys/types.h>
+
+struct ucred_s
+{
+ uint32_t uc_size;
+ uint32_t uc_credoff;
+ uint32_t uc_privoff;
+ pid_t uc_pid;
+ uint32_t uc_audoff;
+ zoneid_t uc_zoneid;
+ projid_t uc_projid;
+ uint32_t uc_labeloff;
+};
+
+#endif /* _UCRED_PRIV_H */
+++ /dev/null
-/* Copyright (C) 2008 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by David Bartley <dtbartle@csclub.uwaterloo.ca>, 2008.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _UCRED_PRIV_H
-#define _UCRED_PRIV_H
-
-#include <sys/types.h>
-
-struct ucred_s
-{
- uint32_t uc_size;
- uint32_t uc_credoff;
- uint32_t uc_privoff;
- pid_t uc_pid;
- uint32_t uc_audoff;
- zoneid_t uc_zoneid;
- projid_t uc_projid;
- uint32_t uc_labeloff;
-};
-
-#endif /* _UCRED_PRIV_H */
02111-1307 USA. */
#include <inline-syscall.h>
-#include "priv_priv.h"
+#include <privP.h>
#include <zone.h>
#include <dlfcn.h>