summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/mdb/common/modules/libc/libc.c454
-rw-r--r--usr/src/cmd/sgs/rtld/amd64/amd64_elf.c4
-rw-r--r--usr/src/cmd/sgs/rtld/amd64/dlamd64getunwind.c6
-rw-r--r--usr/src/cmd/sgs/rtld/common/_rtld.h15
-rw-r--r--usr/src/cmd/sgs/rtld/common/audit.c44
-rw-r--r--usr/src/cmd/sgs/rtld/common/dlfcns.c36
-rw-r--r--usr/src/cmd/sgs/rtld/common/external.c29
-rw-r--r--usr/src/cmd/sgs/rtld/common/globals.c2
-rw-r--r--usr/src/cmd/sgs/rtld/common/remove.c4
-rw-r--r--usr/src/cmd/sgs/rtld/common/setup.c6
-rw-r--r--usr/src/cmd/sgs/rtld/common/util.c38
-rw-r--r--usr/src/cmd/sgs/rtld/i386/i386_elf.c4
-rw-r--r--usr/src/cmd/sgs/rtld/sparc/sparc_a.out.c4
-rw-r--r--usr/src/cmd/sgs/rtld/sparc/sparc_elf.c4
-rw-r--r--usr/src/cmd/sgs/rtld/sparcv9/sparc_elf.c4
-rw-r--r--usr/src/common/util/memcpy.c4
-rw-r--r--usr/src/common/util/memset.c4
-rw-r--r--usr/src/lib/libc/Makefile7
-rw-r--r--usr/src/lib/libc/amd64/crt/cerror.s10
-rw-r--r--usr/src/lib/libc/amd64/fp/fpstart.c20
-rw-r--r--usr/src/lib/libc/amd64/gen/memcpy.s2
-rw-r--r--usr/src/lib/libc/amd64/gen/memset.s2
-rw-r--r--usr/src/lib/libc/amd64/mapfile-vers127
-rw-r--r--usr/src/lib/libc/amd64/sys/__getcontext.s10
-rw-r--r--usr/src/lib/libc/amd64/sys/_lwp_mutex_unlock.s4
-rw-r--r--usr/src/lib/libc/amd64/sys/door.s2
-rw-r--r--usr/src/lib/libc/amd64/sys/getcontext.s14
-rw-r--r--usr/src/lib/libc/amd64/sys/sysi86.s10
-rw-r--r--usr/src/lib/libc/amd64/threads/asm_subr.s13
-rw-r--r--usr/src/lib/libc/amd64/threads/machdep.c6
-rw-r--r--usr/src/lib/libc/common/sys/close.s1
-rw-r--r--usr/src/lib/libc/common/sys/execve.s14
-rw-r--r--usr/src/lib/libc/common/sys/exit.s14
-rw-r--r--usr/src/lib/libc/common/sys/fstat.s2
-rw-r--r--usr/src/lib/libc/common/sys/geteuid.s15
-rw-r--r--usr/src/lib/libc/common/sys/getgid.s14
-rw-r--r--usr/src/lib/libc/common/sys/getpid.s14
-rw-r--r--usr/src/lib/libc/common/sys/getrlimit.s14
-rw-r--r--usr/src/lib/libc/common/sys/getuid.s14
-rw-r--r--usr/src/lib/libc/common/sys/ioctl.s1
-rw-r--r--usr/src/lib/libc/common/sys/mmap.s15
-rw-r--r--usr/src/lib/libc/common/sys/mprotect.s14
-rw-r--r--usr/src/lib/libc/common/sys/munmap.s14
-rw-r--r--usr/src/lib/libc/common/sys/priocntlset.s14
-rw-r--r--usr/src/lib/libc/common/sys/setgid.s14
-rw-r--r--usr/src/lib/libc/common/sys/setuid.s14
-rw-r--r--usr/src/lib/libc/common/sys/stat.s2
-rw-r--r--usr/src/lib/libc/i386/crt/cerror.s10
-rw-r--r--usr/src/lib/libc/i386/crt/cerror64.s10
-rw-r--r--usr/src/lib/libc/i386/fp/fpstart.c21
-rw-r--r--usr/src/lib/libc/i386/gen/memcpy.s10
-rw-r--r--usr/src/lib/libc/i386/gen/memset.s10
-rw-r--r--usr/src/lib/libc/i386/mapfile-vers178
-rw-r--r--usr/src/lib/libc/i386/sys/__getcontext.s10
-rw-r--r--usr/src/lib/libc/i386/sys/_lwp_mutex_unlock.s4
-rw-r--r--usr/src/lib/libc/i386/sys/door.s2
-rw-r--r--usr/src/lib/libc/i386/sys/getcontext.s14
-rw-r--r--usr/src/lib/libc/i386/sys/ptrace.c40
-rw-r--r--usr/src/lib/libc/i386/sys/sysi86.s10
-rw-r--r--usr/src/lib/libc/i386/threads/asm_subr.s13
-rw-r--r--usr/src/lib/libc/i386/threads/machdep.c6
-rw-r--r--usr/src/lib/libc/i386_hwcap1/gen/memcpy.s10
-rw-r--r--usr/src/lib/libc/i386_hwcap1/gen/memset.s10
-rw-r--r--usr/src/lib/libc/inc/libc.h5
-rw-r--r--usr/src/lib/libc/inc/libc_int.h22
-rw-r--r--usr/src/lib/libc/inc/mtlib.h5
-rw-r--r--usr/src/lib/libc/inc/thr_uberdata.h56
-rw-r--r--usr/src/lib/libc/port/gen/atexit.c20
-rw-r--r--usr/src/lib/libc/port/gen/atfork.c7
-rw-r--r--usr/src/lib/libc/port/gen/attrat.c58
-rw-r--r--usr/src/lib/libc/port/gen/errno.c14
-rw-r--r--usr/src/lib/libc/port/gen/malloc.c42
-rw-r--r--usr/src/lib/libc/port/gen/memalign.c11
-rw-r--r--usr/src/lib/libc/port/gen/nss_common.c4
-rw-r--r--usr/src/lib/libc/port/gen/nss_dbdefs.c38
-rw-r--r--usr/src/lib/libc/port/gen/priocntl.c17
-rw-r--r--usr/src/lib/libc/port/gen/select.c7
-rw-r--r--usr/src/lib/libc/port/gen/select_large_fdset.c26
-rw-r--r--usr/src/lib/libc/port/gen/sh_locks.c11
-rw-r--r--usr/src/lib/libc/port/gen/sigsetops.c15
-rw-r--r--usr/src/lib/libc/port/mapfile-vers240
-rw-r--r--usr/src/lib/libc/port/rt/pos4obj.c14
-rw-r--r--usr/src/lib/libc/port/rt/sched.c21
-rw-r--r--usr/src/lib/libc/port/stdio/flockf.c6
-rw-r--r--usr/src/lib/libc/port/stdio/flush.c10
-rw-r--r--usr/src/lib/libc/port/sys/libc_fcntl.c16
-rw-r--r--usr/src/lib/libc/port/sys/libc_open.c31
-rw-r--r--usr/src/lib/libc/port/sys/lwp.c8
-rw-r--r--usr/src/lib/libc/port/sys/pgrpsys.c9
-rw-r--r--usr/src/lib/libc/port/sys/sbrk.c20
-rw-r--r--usr/src/lib/libc/port/sys/ucontext.c10
-rw-r--r--usr/src/lib/libc/port/threads/alloc.c24
-rw-r--r--usr/src/lib/libc/port/threads/assfail.c42
-rw-r--r--usr/src/lib/libc/port/threads/cancel.c1
-rw-r--r--usr/src/lib/libc/port/threads/pthr_attr.c2
-rw-r--r--usr/src/lib/libc/port/threads/pthr_barrier.c2
-rw-r--r--usr/src/lib/libc/port/threads/pthr_mutex.c2
-rw-r--r--usr/src/lib/libc/port/threads/pthread.c7
-rw-r--r--usr/src/lib/libc/port/threads/rwlock.c18
-rw-r--r--usr/src/lib/libc/port/threads/scalls.c51
-rw-r--r--usr/src/lib/libc/port/threads/sema.c2
-rw-r--r--usr/src/lib/libc/port/threads/sigaction.c39
-rw-r--r--usr/src/lib/libc/port/threads/spawn.c54
-rw-r--r--usr/src/lib/libc/port/threads/synch.c66
-rw-r--r--usr/src/lib/libc/port/threads/tdb_agent.c15
-rw-r--r--usr/src/lib/libc/port/threads/thr.c75
-rw-r--r--usr/src/lib/libc/port/threads/tls.c51
-rw-r--r--usr/src/lib/libc/port/threads/tsd.c9
-rw-r--r--usr/src/lib/libc/sparc/crt/cerror.s15
-rw-r--r--usr/src/lib/libc/sparc/crt/cerror64.s10
-rw-r--r--usr/src/lib/libc/sparc/gen/getctxt.c16
-rw-r--r--usr/src/lib/libc/sparc/gen/memcpy.s12
-rw-r--r--usr/src/lib/libc/sparc/gen/memset.s12
-rw-r--r--usr/src/lib/libc/sparc/gen/swapctxt.c15
-rw-r--r--usr/src/lib/libc/sparc/mapfile-vers176
-rw-r--r--usr/src/lib/libc/sparc/sys/__getcontext.s10
-rw-r--r--usr/src/lib/libc/sparc/sys/_lwp_mutex_unlock.s4
-rw-r--r--usr/src/lib/libc/sparc/sys/door.s2
-rw-r--r--usr/src/lib/libc/sparc/sys/ptrace.c44
-rw-r--r--usr/src/lib/libc/sparc/threads/asm_subr.s13
-rw-r--r--usr/src/lib/libc/sparc/threads/machdep.c6
-rw-r--r--usr/src/lib/libc/sparcv9/crt/cerror.s15
-rw-r--r--usr/src/lib/libc/sparcv9/gen/getctxt.c16
-rw-r--r--usr/src/lib/libc/sparcv9/gen/memcpy.s12
-rw-r--r--usr/src/lib/libc/sparcv9/gen/memset.s12
-rw-r--r--usr/src/lib/libc/sparcv9/gen/swapctxt.c15
-rw-r--r--usr/src/lib/libc/sparcv9/mapfile-vers146
127 files changed, 1490 insertions, 1701 deletions
diff --git a/usr/src/cmd/mdb/common/modules/libc/libc.c b/usr/src/cmd/mdb/common/modules/libc/libc.c
index 18114b0021..05ca976f65 100644
--- a/usr/src/cmd/mdb/common/modules/libc/libc.c
+++ b/usr/src/cmd/mdb/common/modules/libc/libc.c
@@ -438,210 +438,210 @@ d_ulwp(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
HD("self uberdata");
mdb_printf(OFFSTR "%s %s\n",
- OFFSET(ul_self),
- prt_addr(ulwp.ul_self, 1),
- prt_addr(ulwp.ul_uberdata, 0));
+ OFFSET(ul_self),
+ prt_addr(ulwp.ul_self, 1),
+ prt_addr(ulwp.ul_uberdata, 0));
HD("tlsent ntlsent");
mdb_printf(OFFSTR "%s %ld\n",
- OFFSET(ul_tlsent),
- prt_addr(ulwp.ul_tlsent, 1),
- ulwp.ul_ntlsent);
+ OFFSET(ul_tlsent),
+ prt_addr(ulwp.ul_tlsent, 1),
+ ulwp.ul_ntlsent);
HD("forw back next");
mdb_printf(OFFSTR "%s %s %s\n",
- OFFSET(ul_forw),
- prt_addr(ulwp.ul_forw, 1),
- prt_addr(ulwp.ul_back, 1),
- prt_addr(ulwp.ul_next, 0));
+ OFFSET(ul_forw),
+ prt_addr(ulwp.ul_forw, 1),
+ prt_addr(ulwp.ul_back, 1),
+ prt_addr(ulwp.ul_next, 0));
HD("hash rval stk");
mdb_printf(OFFSTR "%s %s %s\n",
- OFFSET(ul_hash),
- prt_addr(ulwp.ul_hash, 1),
- prt_addr(ulwp.ul_rval, 1),
- prt_addr(ulwp.ul_stk, 0));
+ OFFSET(ul_hash),
+ prt_addr(ulwp.ul_hash, 1),
+ prt_addr(ulwp.ul_rval, 1),
+ prt_addr(ulwp.ul_stk, 0));
HD("mapsiz guardsize stktop stksiz");
mdb_printf(OFFSTR "%-10ld %-10ld %s %ld\n",
- OFFSET(ul_mapsiz),
- ulwp.ul_mapsiz,
- ulwp.ul_guardsize,
- prt_addr((void *)ulwp.ul_stktop, 1),
- ulwp.ul_stksiz);
+ OFFSET(ul_mapsiz),
+ ulwp.ul_mapsiz,
+ ulwp.ul_guardsize,
+ prt_addr((void *)ulwp.ul_stktop, 1),
+ ulwp.ul_stksiz);
HD("ustack.ss_sp ustack.ss_size ustack.ss_flags");
mdb_printf(OFFSTR "%s %-21ld %s\n",
- OFFSET(ul_ustack.ss_sp),
- prt_addr(ulwp.ul_ustack.ss_sp, 1),
- ulwp.ul_ustack.ss_size,
- stack_flags(&ulwp.ul_ustack));
+ OFFSET(ul_ustack.ss_sp),
+ prt_addr(ulwp.ul_ustack.ss_sp, 1),
+ ulwp.ul_ustack.ss_size,
+ stack_flags(&ulwp.ul_ustack));
HD("ix lwpid pri epri policy cid");
mdb_printf(OFFSTR "%-10d %-10d %-10d %-10d %-10d %d\n",
- OFFSET(ul_ix),
- ulwp.ul_ix,
- ulwp.ul_lwpid,
- ulwp.ul_pri,
- ulwp.ul_epri,
- ulwp.ul_policy,
- ulwp.ul_cid);
+ OFFSET(ul_ix),
+ ulwp.ul_ix,
+ ulwp.ul_lwpid,
+ ulwp.ul_pri,
+ ulwp.ul_epri,
+ ulwp.ul_policy,
+ ulwp.ul_cid);
HD("cursig pleasestop stop signalled dead unwind");
mdb_printf(OFFSTR "%-10d ",
- OFFSET(ul_cursig),
- ulwp.ul_cursig);
+ OFFSET(ul_cursig),
+ ulwp.ul_cursig);
mdb_printf(ulwp.ul_pleasestop? "0x%-8x " : "%-10d ",
- ulwp.ul_pleasestop);
+ ulwp.ul_pleasestop);
mdb_printf(ulwp.ul_stop? "0x%-8x " : "%-10d ",
- ulwp.ul_stop);
+ ulwp.ul_stop);
mdb_printf("%-10d %-10d %d\n",
- ulwp.ul_signalled,
- ulwp.ul_dead,
- ulwp.ul_unwind);
+ ulwp.ul_signalled,
+ ulwp.ul_dead,
+ ulwp.ul_unwind);
HD("detached writer stopping can'prolog preempt savpreempt");
mdb_printf(OFFSTR "%-10d %-10d %-10d %-10d %-10d %d\n",
- OFFSET(ul_detached),
- ulwp.ul_detached,
- ulwp.ul_writer,
- ulwp.ul_stopping,
- ulwp.ul_cancel_prologue,
- ulwp.ul_preempt,
- ulwp.ul_savpreempt);
+ OFFSET(ul_detached),
+ ulwp.ul_detached,
+ ulwp.ul_writer,
+ ulwp.ul_stopping,
+ ulwp.ul_cancel_prologue,
+ ulwp.ul_preempt,
+ ulwp.ul_savpreempt);
HD("sigsuspend main fork primarymap m'spinners d'noreserv");
mdb_printf(OFFSTR "%-10d %-10d %-10d %-10d %-10d %d\n",
- OFFSET(ul_sigsuspend),
- ulwp.ul_sigsuspend,
- ulwp.ul_main,
- ulwp.ul_fork,
- ulwp.ul_primarymap,
- ulwp.ul_max_spinners,
- ulwp.ul_door_noreserve);
+ OFFSET(ul_sigsuspend),
+ ulwp.ul_sigsuspend,
+ ulwp.ul_main,
+ ulwp.ul_fork,
+ ulwp.ul_primarymap,
+ ulwp.ul_max_spinners,
+ ulwp.ul_door_noreserve);
HD("queue_fifo c'w'defer e'detect' async_safe rt rtqueued");
mdb_printf(OFFSTR "%-10d %-10d %-10d %-10d %-10d %d\n",
- OFFSET(ul_queue_fifo),
- ulwp.ul_queue_fifo,
- ulwp.ul_cond_wait_defer,
- ulwp.ul_error_detection,
- ulwp.ul_async_safe,
- ulwp.ul_rt,
- ulwp.ul_rtqueued);
+ OFFSET(ul_queue_fifo),
+ ulwp.ul_queue_fifo,
+ ulwp.ul_cond_wait_defer,
+ ulwp.ul_error_detection,
+ ulwp.ul_async_safe,
+ ulwp.ul_rt,
+ ulwp.ul_rtqueued);
HD("adapt'spin queue_spin critical sigdefer vfork");
mdb_printf(OFFSTR "%-10d %-10d %-10d %-10d %d\n",
- OFFSET(ul_adaptive_spin),
- ulwp.ul_adaptive_spin,
- ulwp.ul_queue_spin,
- ulwp.ul_critical,
- ulwp.ul_sigdefer,
- ulwp.ul_vfork);
+ OFFSET(ul_adaptive_spin),
+ ulwp.ul_adaptive_spin,
+ ulwp.ul_queue_spin,
+ ulwp.ul_critical,
+ ulwp.ul_sigdefer,
+ ulwp.ul_vfork);
HD("cancelable c'pending c'disabled c'async save_async mutator");
mdb_printf(OFFSTR "%-10d %-10d %-10d %-10d %-10d %d\n",
- OFFSET(ul_cancelable),
- ulwp.ul_cancelable,
- ulwp.ul_cancel_pending,
- ulwp.ul_cancel_disabled,
- ulwp.ul_cancel_async,
- ulwp.ul_save_async,
- ulwp.ul_mutator);
+ OFFSET(ul_cancelable),
+ ulwp.ul_cancelable,
+ ulwp.ul_cancel_pending,
+ ulwp.ul_cancel_disabled,
+ ulwp.ul_cancel_async,
+ ulwp.ul_save_async,
+ ulwp.ul_mutator);
HD("created replace nocancel errno errnop");
mdb_printf(OFFSTR "%-10d %-10d %-10d %-10d %s\n",
- OFFSET(ul_created),
- ulwp.ul_created,
- ulwp.ul_replace,
- ulwp.ul_nocancel,
- ulwp.ul_errno,
- prt_addr(ulwp.ul_errnop, 0));
+ OFFSET(ul_created),
+ ulwp.ul_created,
+ ulwp.ul_replace,
+ ulwp.ul_nocancel,
+ ulwp.ul_errno,
+ prt_addr(ulwp.ul_errnop, 0));
HD("clnup_hdr schedctl_called schedctl");
mdb_printf(OFFSTR "%s %s %s\n",
- OFFSET(ul_clnup_hdr),
- prt_addr(ulwp.ul_clnup_hdr, 1),
- prt_addr(ulwp.ul_schedctl_called, 1),
- prt_addr((void *)ulwp.ul_schedctl, 0));
+ OFFSET(ul_clnup_hdr),
+ prt_addr(ulwp.ul_clnup_hdr, 1),
+ prt_addr(ulwp.ul_schedctl_called, 1),
+ prt_addr((void *)ulwp.ul_schedctl, 0));
HD("bindflags libc_locks stsd &ftsd");
mdb_printf(OFFSTR,
- OFFSET(ul_bindflags));
+ OFFSET(ul_bindflags));
mdb_printf(ulwp.ul_bindflags? "0x%-8x " : "%-10d ",
- ulwp.ul_bindflags);
+ ulwp.ul_bindflags);
mdb_printf("%-10d ", ulwp.ul_libc_locks);
mdb_printf("%s %s\n",
- prt_addr(ulwp.ul_stsd, 1),
- prt_addr((void *)(addr + OFFSET(ul_ftsd[0])), 0));
+ prt_addr(ulwp.ul_stsd, 1),
+ prt_addr((void *)(addr + OFFSET(ul_ftsd[0])), 0));
HD("eventmask[0..1] eventnum eventdata");
mdb_printf(OFFSTR "0x%08x 0x%08x %-21d %s\n",
- OFFSET(ul_td_evbuf.eventmask.event_bits[0]),
- ulwp.ul_td_evbuf.eventmask.event_bits[0],
- ulwp.ul_td_evbuf.eventmask.event_bits[1],
- ulwp.ul_td_evbuf.eventnum,
- prt_addr(ulwp.ul_td_evbuf.eventdata, 0));
+ OFFSET(ul_td_evbuf.eventmask.event_bits[0]),
+ ulwp.ul_td_evbuf.eventmask.event_bits[0],
+ ulwp.ul_td_evbuf.eventmask.event_bits[1],
+ ulwp.ul_td_evbuf.eventnum,
+ prt_addr(ulwp.ul_td_evbuf.eventdata, 0));
HD("td'enable sync'reg qtype cv_wake usropts");
mdb_printf(OFFSTR "%-10d %-10d %-10d %-10d ",
- OFFSET(ul_td_events_enable),
- ulwp.ul_td_events_enable,
- ulwp.ul_sync_obj_reg,
- ulwp.ul_qtype,
- ulwp.ul_cv_wake);
+ OFFSET(ul_td_events_enable),
+ ulwp.ul_td_events_enable,
+ ulwp.ul_sync_obj_reg,
+ ulwp.ul_qtype,
+ ulwp.ul_cv_wake);
mdb_printf(ulwp.ul_usropts? "0x%x\n" : "%d\n",
- ulwp.ul_usropts);
+ ulwp.ul_usropts);
HD("startpc startarg wchan");
mdb_printf(OFFSTR "%s %s %s\n",
- OFFSET(ul_startpc),
- prt_addr((void *)ulwp.ul_startpc, 1),
- prt_addr(ulwp.ul_startarg, 1),
- prt_addr(ulwp.ul_wchan, 0));
+ OFFSET(ul_startpc),
+ prt_addr((void *)ulwp.ul_startpc, 1),
+ prt_addr(ulwp.ul_startarg, 1),
+ prt_addr(ulwp.ul_wchan, 0));
HD("link sleepq cvmutex");
mdb_printf(OFFSTR "%s %s %s\n",
- OFFSET(ul_link),
- prt_addr(ulwp.ul_link, 1),
- prt_addr(ulwp.ul_sleepq, 1),
- prt_addr(ulwp.ul_cvmutex, 0));
+ OFFSET(ul_link),
+ prt_addr(ulwp.ul_link, 1),
+ prt_addr(ulwp.ul_sleepq, 1),
+ prt_addr(ulwp.ul_cvmutex, 0));
HD("mxchain save_state");
mdb_printf(OFFSTR "%s %d\n",
- OFFSET(ul_mxchain),
- prt_addr(ulwp.ul_mxchain, 1),
- ulwp.ul_save_state);
+ OFFSET(ul_mxchain),
+ prt_addr(ulwp.ul_mxchain, 1),
+ ulwp.ul_save_state);
HD("rdlockcnt rd_rwlock rd_count");
mdb_printf(OFFSTR "%-21d %s %d\n",
- OFFSET(ul_rdlockcnt),
- ulwp.ul_rdlockcnt,
- prt_addr(ulwp.ul_readlock.single.rd_rwlock, 1),
- ulwp.ul_readlock.single.rd_count);
+ OFFSET(ul_rdlockcnt),
+ ulwp.ul_rdlockcnt,
+ prt_addr(ulwp.ul_readlock.single.rd_rwlock, 1),
+ ulwp.ul_readlock.single.rd_count);
HD("heldlockcnt heldlocks tpdp");
mdb_printf(OFFSTR "%-21d %s %s\n",
- OFFSET(ul_heldlockcnt),
- ulwp.ul_heldlockcnt,
- prt_addr(ulwp.ul_heldlocks.single, 1),
- prt_addr(ulwp.ul_tpdp, 0));
+ OFFSET(ul_heldlockcnt),
+ ulwp.ul_heldlockcnt,
+ prt_addr(ulwp.ul_heldlocks.single, 1),
+ prt_addr(ulwp.ul_tpdp, 0));
HD("siglink s'l'spin s'l'spin2 s'l'sleep s'l'wakeup");
mdb_printf(OFFSTR "%s %-10d %-10d %-10d %d\n",
- OFFSET(ul_siglink),
- prt_addr(ulwp.ul_siglink, 1),
- ulwp.ul_spin_lock_spin,
- ulwp.ul_spin_lock_spin2,
- ulwp.ul_spin_lock_sleep,
- ulwp.ul_spin_lock_wakeup);
+ OFFSET(ul_siglink),
+ prt_addr(ulwp.ul_siglink, 1),
+ ulwp.ul_spin_lock_spin,
+ ulwp.ul_spin_lock_spin2,
+ ulwp.ul_spin_lock_sleep,
+ ulwp.ul_spin_lock_wakeup);
HD("&queue_root rtclassid pilocks");
mdb_printf(OFFSTR "%s %-10d %d\n",
- OFFSET(ul_queue_root),
- prt_addr((void *)(addr + OFFSET(ul_queue_root)), 1),
- ulwp.ul_rtclassid,
- ulwp.ul_pilocks);
+ OFFSET(ul_queue_root),
+ prt_addr((void *)(addr + OFFSET(ul_queue_root)), 1),
+ ulwp.ul_rtclassid,
+ ulwp.ul_pilocks);
/*
* The remainder of the ulwp_t structure
@@ -652,26 +652,26 @@ d_ulwp(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
HD("sigmask[0..3]");
mdb_printf(OFFSTR "0x%08x 0x%08x 0x%08x 0x%08x\n",
- OFFSET(ul_sigmask.__sigbits[0]),
- ulwp.ul_sigmask.__sigbits[0],
- ulwp.ul_sigmask.__sigbits[1],
- ulwp.ul_sigmask.__sigbits[2],
- ulwp.ul_sigmask.__sigbits[3]);
+ OFFSET(ul_sigmask.__sigbits[0]),
+ ulwp.ul_sigmask.__sigbits[0],
+ ulwp.ul_sigmask.__sigbits[1],
+ ulwp.ul_sigmask.__sigbits[2],
+ ulwp.ul_sigmask.__sigbits[3]);
HD("tmpmask[0..3]");
mdb_printf(OFFSTR "0x%08x 0x%08x 0x%08x 0x%08x\n",
- OFFSET(ul_tmpmask.__sigbits[0]),
- ulwp.ul_tmpmask.__sigbits[0],
- ulwp.ul_tmpmask.__sigbits[1],
- ulwp.ul_tmpmask.__sigbits[2],
- ulwp.ul_tmpmask.__sigbits[3]);
+ OFFSET(ul_tmpmask.__sigbits[0]),
+ ulwp.ul_tmpmask.__sigbits[0],
+ ulwp.ul_tmpmask.__sigbits[1],
+ ulwp.ul_tmpmask.__sigbits[2],
+ ulwp.ul_tmpmask.__sigbits[3]);
HD("&siginfo &spinlock &fpuenv");
mdb_printf(OFFSTR "%s %s %s\n",
- OFFSET(ul_siginfo),
- prt_addr((void *)(addr + OFFSET(ul_siginfo)), 1),
- prt_addr((void *)(addr + OFFSET(ul_spinlock)), 1),
- prt_addr((void *)(addr + OFFSET(ul_fpuenv)), 0));
+ OFFSET(ul_siginfo),
+ prt_addr((void *)(addr + OFFSET(ul_siginfo)), 1),
+ prt_addr((void *)(addr + OFFSET(ul_spinlock)), 1),
+ prt_addr((void *)(addr + OFFSET(ul_fpuenv)), 0));
return (DCMD_OK);
}
@@ -726,139 +726,141 @@ d_uberdata(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
mdb_printf("%#a\n", addr);
- HD("&link_lock &fork_lock &atfork_lock");
+ HD("&link_lock &ld_lock &fork_lock");
mdb_printf(OFFSTR "%s %s %s\n",
- OFFSET(link_lock),
- prt_addr((void *)(addr + OFFSET(link_lock)), 1),
- prt_addr((void *)(addr + OFFSET(fork_lock)), 1),
- prt_addr((void *)(addr + OFFSET(atfork_lock)), 0));
+ OFFSET(link_lock),
+ prt_addr((void *)(addr + OFFSET(link_lock)), 1),
+ prt_addr((void *)(addr + OFFSET(ld_lock)), 1),
+ prt_addr((void *)(addr + OFFSET(fork_lock)), 0));
- HD("&callout_lock &tdb_hash_lock &siguaction[0]");
+ HD("&atfork_lock &callout_lock &tdb_hash_lock");
mdb_printf(OFFSTR "%s %s %s\n",
- OFFSET(callout_lock),
- prt_addr((void *)(addr + OFFSET(callout_lock)), 1),
- prt_addr((void *)(addr + OFFSET(tdb_hash_lock)), 1),
- prt_addr((void *)(addr + OFFSET(siguaction)), 0));
+ OFFSET(atfork_lock),
+ prt_addr((void *)(addr + OFFSET(atfork_lock)), 1),
+ prt_addr((void *)(addr + OFFSET(callout_lock)), 1),
+ prt_addr((void *)(addr + OFFSET(tdb_hash_lock)), 0));
+
+ HD("&tdb_hash_lock_stats &siguaction[0]");
+ mdb_printf(OFFSTR "%s %s\n",
+ OFFSET(tdb_hash_lock_stats),
+ prt_addr((void *)(addr + OFFSET(tdb_hash_lock_stats)), 1),
+ prt_addr((void *)(addr + OFFSET(siguaction)), 0));
HD("&bucket free_list chunks");
for (i = 0; i < NBUCKETS; i++) {
mdb_printf(OFFSTR "%s %s %ld\n",
- OFFSET(bucket[i]),
- prt_addr((void *)(addr + OFFSET(bucket[i])), 1),
- prt_addr(uberdata.bucket[i].free_list, 1),
- uberdata.bucket[i].chunks);
+ OFFSET(bucket[i]),
+ prt_addr((void *)(addr + OFFSET(bucket[i])), 1),
+ prt_addr(uberdata.bucket[i].free_list, 1),
+ uberdata.bucket[i].chunks);
}
HD("&atexit_root head exit_frame_monitor");
mdb_printf(OFFSTR "%s %s %s\n",
- OFFSET(atexit_root),
- prt_addr((void *)(addr + OFFSET(atexit_root.exitfns_lock)), 1),
- prt_addr(uberdata.atexit_root.head, 1),
- prt_addr(uberdata.atexit_root.exit_frame_monitor, 0));
+ OFFSET(atexit_root),
+ prt_addr((void *)(addr + OFFSET(atexit_root.exitfns_lock)), 1),
+ prt_addr(uberdata.atexit_root.head, 1),
+ prt_addr(uberdata.atexit_root.exit_frame_monitor, 0));
HD("&tsd_metadata tsdm_nkeys tsdm_nused tsdm_destro");
mdb_printf(OFFSTR "%s %-10d %-10d %s\n",
- OFFSET(tsd_metadata),
- prt_addr((void *)(addr + OFFSET(tsd_metadata.tsdm_lock)), 1),
- uberdata.tsd_metadata.tsdm_nkeys,
- uberdata.tsd_metadata.tsdm_nused,
- prt_addr((void *)uberdata.tsd_metadata.tsdm_destro, 0));
+ OFFSET(tsd_metadata),
+ prt_addr((void *)(addr + OFFSET(tsd_metadata.tsdm_lock)), 1),
+ uberdata.tsd_metadata.tsdm_nkeys,
+ uberdata.tsd_metadata.tsdm_nused,
+ prt_addr((void *)uberdata.tsd_metadata.tsdm_destro, 0));
HD("&tls_metadata tls_modinfo.data tls_modinfo.size");
mdb_printf(OFFSTR "%s %s %ld\n",
- OFFSET(tls_metadata),
- prt_addr((void *)(addr + OFFSET(tls_metadata.tls_lock)), 1),
- prt_addr(uberdata.tls_metadata.tls_modinfo.tls_data, 1),
- uberdata.tls_metadata.tls_modinfo.tls_size);
+ OFFSET(tls_metadata),
+ prt_addr((void *)(addr + OFFSET(tls_metadata.tls_lock)), 1),
+ prt_addr(uberdata.tls_metadata.tls_modinfo.tls_data, 1),
+ uberdata.tls_metadata.tls_modinfo.tls_size);
HD(" static_tls.data static_tls.size");
mdb_printf(OFFSTR "%s %s %ld\n",
- OFFSET(tls_metadata.static_tls),
- " ",
- prt_addr(uberdata.tls_metadata.static_tls.tls_data, 1),
- uberdata.tls_metadata.static_tls.tls_size);
+ OFFSET(tls_metadata.static_tls),
+ " ",
+ prt_addr(uberdata.tls_metadata.static_tls.tls_data, 1),
+ uberdata.tls_metadata.static_tls.tls_size);
HD("primary_ma bucket_ini uflags.mt uflags.pad uflags.trs uflags.ted");
mdb_printf(OFFSTR "%-10d %-10d %-10d %-10d %-10d %d\n",
- OFFSET(primary_map),
- uberdata.primary_map,
- uberdata.bucket_init,
- uberdata.uberflags.uf_x.x_mt,
- uberdata.uberflags.uf_x.x_pad,
- uberdata.uberflags.uf_x.x_tdb_register_sync,
- uberdata.uberflags.uf_x.x_thread_error_detection);
+ OFFSET(primary_map),
+ uberdata.primary_map,
+ uberdata.bucket_init,
+ uberdata.uberflags.uf_x.x_mt,
+ uberdata.uberflags.uf_x.x_pad,
+ uberdata.uberflags.uf_x.x_tdb_register_sync,
+ uberdata.uberflags.uf_x.x_thread_error_detection);
HD("queue_head thr_hash_table hash_size hash_mask");
mdb_printf(OFFSTR "%s %s %-10d 0x%x\n",
- OFFSET(queue_head),
- prt_addr(uberdata.queue_head, 1),
- prt_addr(uberdata.thr_hash_table, 1),
- uberdata.hash_size,
- uberdata.hash_mask);
+ OFFSET(queue_head),
+ prt_addr(uberdata.queue_head, 1),
+ prt_addr(uberdata.thr_hash_table, 1),
+ uberdata.hash_size,
+ uberdata.hash_mask);
HD("ulwp_one all_lwps all_zombies");
mdb_printf(OFFSTR "%s %s %s\n",
- OFFSET(ulwp_one),
- prt_addr(uberdata.ulwp_one, 1),
- prt_addr(uberdata.all_lwps, 1),
- prt_addr(uberdata.all_zombies, 0));
+ OFFSET(ulwp_one),
+ prt_addr(uberdata.ulwp_one, 1),
+ prt_addr(uberdata.all_lwps, 1),
+ prt_addr(uberdata.all_zombies, 0));
HD("nthreads nzombies ndaemons pid sigacthandler");
mdb_printf(OFFSTR "%-10d %-10d %-10d %-10d %s\n",
- OFFSET(nthreads),
- uberdata.nthreads,
- uberdata.nzombies,
- uberdata.ndaemons,
- (int)uberdata.pid,
- prt_addr((void *)uberdata.sigacthandler, 0));
+ OFFSET(nthreads),
+ uberdata.nthreads,
+ uberdata.nzombies,
+ uberdata.ndaemons,
+ (int)uberdata.pid,
+ prt_addr((void *)uberdata.sigacthandler, 0));
HD("lwp_stacks lwp_laststack nfreestack stk_cache");
mdb_printf(OFFSTR "%s %s %-10d %d\n",
- OFFSET(lwp_stacks),
- prt_addr(uberdata.lwp_stacks, 1),
- prt_addr(uberdata.lwp_laststack, 1),
- uberdata.nfreestack,
- uberdata.thread_stack_cache);
-
- HD("ulwp_freelist ulwp_lastfree");
- mdb_printf(OFFSTR "%s %s\n",
- OFFSET(ulwp_freelist),
- prt_addr(uberdata.ulwp_freelist, 1),
- prt_addr(uberdata.ulwp_lastfree, 0));
+ OFFSET(lwp_stacks),
+ prt_addr(uberdata.lwp_stacks, 1),
+ prt_addr(uberdata.lwp_laststack, 1),
+ uberdata.nfreestack,
+ uberdata.thread_stack_cache);
- HD("ulwp_replace_free ulwp_replace_last");
- mdb_printf(OFFSTR "%s %s\n",
- OFFSET(ulwp_replace_free),
- prt_addr(uberdata.ulwp_replace_free, 1),
- prt_addr(uberdata.ulwp_replace_last, 0));
+ HD("ulwp_freelist ulwp_lastfree ulwp_replace_free");
+ mdb_printf(OFFSTR "%s %s %s\n",
+ OFFSET(ulwp_freelist),
+ prt_addr(uberdata.ulwp_freelist, 1),
+ prt_addr(uberdata.ulwp_lastfree, 1),
+ prt_addr(uberdata.ulwp_replace_free, 0));
- HD("atforklist robustlocks");
- mdb_printf(OFFSTR "%s %s\n",
- OFFSET(atforklist),
- prt_addr(uberdata.atforklist, 1),
- prt_addr(uberdata.robustlocks, 0));
+ HD("ulwp_replace_last atforklist robustlocks");
+ mdb_printf(OFFSTR "%s %s %s\n",
+ OFFSET(ulwp_replace_last),
+ prt_addr(uberdata.ulwp_replace_last, 1),
+ prt_addr(uberdata.atforklist, 1),
+ prt_addr(uberdata.robustlocks, 0));
HD("tdb_bootstrap tdb_sync_addr_hash tdb_'count tdb_'fail");
mdb_printf(OFFSTR "%s %s %-10d %d\n",
- OFFSET(tdb_bootstrap),
- prt_addr(uberdata.tdb_bootstrap, 1),
- prt_addr(uberdata.tdb.tdb_sync_addr_hash, 1),
- uberdata.tdb.tdb_register_count,
- uberdata.tdb.tdb_hash_alloc_failed);
+ OFFSET(tdb_bootstrap),
+ prt_addr(uberdata.tdb_bootstrap, 1),
+ prt_addr(uberdata.tdb.tdb_sync_addr_hash, 1),
+ uberdata.tdb.tdb_register_count,
+ uberdata.tdb.tdb_hash_alloc_failed);
HD("tdb_sync_addr_free tdb_sync_addr_last tdb_sync_alloc");
mdb_printf(OFFSTR "%s %s %ld\n",
- OFFSET(tdb.tdb_sync_addr_free),
- prt_addr(uberdata.tdb.tdb_sync_addr_free, 1),
- prt_addr(uberdata.tdb.tdb_sync_addr_last, 1),
- uberdata.tdb.tdb_sync_alloc);
+ OFFSET(tdb.tdb_sync_addr_free),
+ prt_addr(uberdata.tdb.tdb_sync_addr_free, 1),
+ prt_addr(uberdata.tdb.tdb_sync_addr_last, 1),
+ uberdata.tdb.tdb_sync_alloc);
HD("tdb_ev_global_mask tdb_events");
mdb_printf(OFFSTR "0x%08x 0x%08x %s\n",
- OFFSET(tdb.tdb_ev_global_mask),
- uberdata.tdb.tdb_ev_global_mask.event_bits[0],
- uberdata.tdb.tdb_ev_global_mask.event_bits[1],
- prt_addr((void *)uberdata.tdb.tdb_events, 0));
+ OFFSET(tdb.tdb_ev_global_mask),
+ uberdata.tdb.tdb_ev_global_mask.event_bits[0],
+ uberdata.tdb.tdb_ev_global_mask.event_bits[1],
+ prt_addr((void *)uberdata.tdb.tdb_events, 0));
return (DCMD_OK);
}
diff --git a/usr/src/cmd/sgs/rtld/amd64/amd64_elf.c b/usr/src/cmd/sgs/rtld/amd64/amd64_elf.c
index 3f760ab02e..036fc356f6 100644
--- a/usr/src/cmd/sgs/rtld/amd64/amd64_elf.c
+++ b/usr/src/cmd/sgs/rtld/amd64/amd64_elf.c
@@ -230,7 +230,7 @@ elf_bndr(Rt_map *lmp, ulong_t pltndx, caddr_t from)
* further process a locking request. Under this recursion we disable
* tsort and cleanup activities.
*/
- entry = enter();
+ entry = enter(0);
lml = LIST(lmp);
if ((lmflags = lml->lm_flags) & LML_FLG_RTLDLM) {
@@ -364,7 +364,7 @@ elf_bndr(Rt_map *lmp, ulong_t pltndx, caddr_t from)
*/
if (entry) {
is_dep_init(nlmp, lmp);
- leave(lml);
+ leave(lml, 0);
}
if (lmflags & LML_FLG_RTLDLM)
diff --git a/usr/src/cmd/sgs/rtld/amd64/dlamd64getunwind.c b/usr/src/cmd/sgs/rtld/amd64/dlamd64getunwind.c
index e63db64aba..c70ec72550 100644
--- a/usr/src/cmd/sgs/rtld/amd64/dlamd64getunwind.c
+++ b/usr/src/cmd/sgs/rtld/amd64/dlamd64getunwind.c
@@ -20,7 +20,7 @@
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -121,7 +121,7 @@ _dlamd64getunwind(void *pc, Dl_amd64_unwindinfo *unwindinfo)
{
Rt_map *lmp;
Lm_list *lml;
- int entry = enter();
+ int entry = enter(0);
/*
* Identify the link-map associated with the exception "pc". Note,
@@ -141,6 +141,6 @@ _dlamd64getunwind(void *pc, Dl_amd64_unwindinfo *unwindinfo)
unwindinfo = getunwind_core(lml, lmp, pc, unwindinfo);
if (entry)
- leave(lml);
+ leave(lml, 0);
return (unwindinfo);
}
diff --git a/usr/src/cmd/sgs/rtld/common/_rtld.h b/usr/src/cmd/sgs/rtld/common/_rtld.h
index 375e04215b..ecb9ffb8d8 100644
--- a/usr/src/cmd/sgs/rtld/common/_rtld.h
+++ b/usr/src/cmd/sgs/rtld/common/_rtld.h
@@ -337,9 +337,14 @@ typedef struct {
/*
* Binding flags for the bindguard routines.
+ * These are defined in usr/src/lib/libc/inc/libc_int.h in the
+ * latest version of the libc/rtld runtime interface (CI_V_FIVE).
*/
+#if !defined(CI_V_FIVE)
#define THR_FLG_RTLD 0x00000001 /* rtldlock bind_guard() flag */
-#define THR_FLG_MASK THR_FLG_RTLD /* mask for all THR_FLG flags */
+#define THR_FLG_NOLOCK 0x00000000 /* no-op before CI_V_FIVE */
+#define THR_FLG_REENTER 0x00000000 /* no-op before CI_V_FIVE */
+#endif
#define ROUND(x, a) (((int)(x) + ((int)(a) - 1)) & ~((int)(a) - 1))
@@ -416,7 +421,9 @@ typedef struct {
*/
extern Lc_desc glcs[]; /* global external interfaces */
-extern Rt_lock rtldlock; /* rtld lock */
+extern Rt_lock rtldlock; /* rtld lock */
+extern int thr_flg_nolock;
+extern int thr_flg_reenter;
extern List dynlm_list; /* dynamic list of link-maps */
extern char **environ; /* environ pointer */
@@ -549,7 +556,7 @@ extern ulong_t elf_reloc_relacount(ulong_t, ulong_t,
ulong_t, ulong_t);
extern long elf_static_tls(Rt_map *, Sym *, void *, uchar_t, char *,
ulong_t, long);
-extern int enter(void);
+extern int enter(int);
extern uint_t expand(char **, size_t *, char **, uint_t, uint_t,
Rt_map *);
extern Pnode *expand_paths(Rt_map *, const char *, uint_t, uint_t);
@@ -582,7 +589,7 @@ extern Listnode *list_append(List *, const void *);
extern Listnode *list_insert(List *, const void *, Listnode *);
extern Listnode *list_prepend(List *, const void *);
extern void list_delete(List *, void *);
-extern void leave(Lm_list *);
+extern void leave(Lm_list *, int);
extern void lm_append(Lm_list *, Aliste, Rt_map *);
extern void lm_delete(Lm_list *, Rt_map *);
extern void lm_move(Lm_list *, Aliste, Aliste, Lm_cntl *,
diff --git a/usr/src/cmd/sgs/rtld/common/audit.c b/usr/src/cmd/sgs/rtld/common/audit.c
index c863943be1..aa46e96e66 100644
--- a/usr/src/cmd/sgs/rtld/common/audit.c
+++ b/usr/src/cmd/sgs/rtld/common/audit.c
@@ -101,11 +101,11 @@ _audit_objfilter(List *list, Rt_map *frlmp, const char *ref, Rt_map *felmp,
if ((feacp = _audit_client(AUDINFO(felmp), alp->al_lmp)) == 0)
continue;
- leave(LIST(alp->al_lmp));
+ leave(LIST(alp->al_lmp), thr_flg_reenter);
if ((*alp->al_objfilter)(&(fracp->ac_cookie), ref,
&(feacp->ac_cookie), flags) == 0)
return (0);
- (void) enter();
+ (void) enter(thr_flg_reenter);
}
return (1);
}
@@ -155,9 +155,9 @@ _audit_objsearch(List *list, char *name, Rt_map *clmp, uint_t flags)
if ((acp = _audit_client(AUDINFO(clmp), alp->al_lmp)) == 0)
continue;
- leave(LIST(alp->al_lmp));
+ leave(LIST(alp->al_lmp), thr_flg_reenter);
nname = (*alp->al_objsearch)(nname, &(acp->ac_cookie), flags);
- (void) enter();
+ (void) enter(thr_flg_reenter);
if (nname == 0)
break;
}
@@ -235,9 +235,9 @@ _audit_activity(List *list, Rt_map *clmp, uint_t flags)
alml->lm_flags &= ~LML_FLG_AUDITNOTIFY;
}
- leave(LIST(alp->al_lmp));
+ leave(LIST(alp->al_lmp), thr_flg_reenter);
(*alp->al_activity)(&(acp->ac_cookie), flags);
- (void) enter();
+ (void) enter(thr_flg_reenter);
}
}
@@ -291,10 +291,10 @@ _audit_objopen(List *list, Rt_map *nlmp, Lmid_t lmid, Audit_info *aip,
DBG_CALL(Dbg_audit_object(LIST(alp->al_lmp), alp->al_libname,
NAME(nlmp)));
- leave(LIST(alp->al_lmp));
+ leave(LIST(alp->al_lmp), thr_flg_reenter);
flags = (*alp->al_objopen)((Link_map *)nlmp, lmid,
&(acp->ac_cookie));
- (void) enter();
+ (void) enter(thr_flg_reenter);
if (flags & LA_FLG_BINDTO)
acp->ac_flags |= FLG_AC_BINDTO;
@@ -403,9 +403,9 @@ _audit_objclose(List *list, Rt_map *lmp)
if ((acp = _audit_client(AUDINFO(lmp), alp->al_lmp)) == 0)
continue;
- leave(LIST(alp->al_lmp));
+ leave(LIST(alp->al_lmp), thr_flg_reenter);
(*alp->al_objclose)(&(acp->ac_cookie));
- (void) enter();
+ (void) enter(thr_flg_reenter);
}
}
@@ -463,7 +463,7 @@ _audit_pltenter(List *list, Rt_map *rlmp, Rt_map *dlmp, Sym *sym,
((dacp->ac_flags & FLG_AC_BINDTO) == 0))
continue;
- leave(LIST(alp->al_lmp));
+ leave(LIST(alp->al_lmp), thr_flg_reenter);
sym->st_value = (Addr)(*alp->al_pltenter)(sym, ndx,
&(racp->ac_cookie), &(dacp->ac_cookie), regs,
/* BEGIN CSTYLED */
@@ -473,7 +473,7 @@ _audit_pltenter(List *list, Rt_map *rlmp, Rt_map *dlmp, Sym *sym,
flags);
#endif
/* END CSTYLED */
- (void) enter();
+ (void) enter(thr_flg_reenter);
DBG_CALL(Dbg_audit_symval(LIST(alp->al_lmp), alp->al_libname,
MSG_ORIG(MSG_AUD_PLTENTER), name, prev, sym->st_name));
@@ -490,7 +490,7 @@ audit_pltenter(Rt_map *rlmp, Rt_map *dlmp, Sym *sym, uint_t ndx,
/*
* We're effectively entering ld.so.1 from user (glue) code.
*/
- (void) enter();
+ (void) enter(0);
if ((rtld_flags & RT_FL_APPLIC) == 0)
_appl = rtld_flags |= RT_FL_APPLIC;
@@ -504,7 +504,7 @@ audit_pltenter(Rt_map *rlmp, Rt_map *dlmp, Sym *sym, uint_t ndx,
if (_appl)
rtld_flags &= ~RT_FL_APPLIC;
- leave(LIST(rlmp));
+ leave(LIST(rlmp), 0);
return (_sym.st_value);
}
@@ -538,7 +538,7 @@ _audit_pltexit(List *list, uintptr_t retval, Rt_map *rlmp, Rt_map *dlmp,
((dacp->ac_flags & FLG_AC_BINDTO) == 0))
continue;
- leave(LIST(alp->al_lmp));
+ leave(LIST(alp->al_lmp), thr_flg_reenter);
retval = (*alp->al_pltexit)(sym, ndx,
&(racp->ac_cookie), &(dacp->ac_cookie),
/* BEGIN CSTYLED */
@@ -548,7 +548,7 @@ _audit_pltexit(List *list, uintptr_t retval, Rt_map *rlmp, Rt_map *dlmp,
retval);
#endif
/* END CSTYLED */
- (void) enter();
+ (void) enter(thr_flg_reenter);
}
return (retval);
}
@@ -563,7 +563,7 @@ audit_pltexit(uintptr_t retval, Rt_map *rlmp, Rt_map *dlmp, Sym *sym,
/*
* We're effectively entering ld.so.1 from user (glue) code.
*/
- (void) enter();
+ (void) enter(0);
if ((rtld_flags & RT_FL_APPLIC) == 0)
_appl = rtld_flags |= RT_FL_APPLIC;
@@ -576,7 +576,7 @@ audit_pltexit(uintptr_t retval, Rt_map *rlmp, Rt_map *dlmp, Sym *sym,
if (_appl)
rtld_flags &= ~RT_FL_APPLIC;
- leave(LIST(rlmp));
+ leave(LIST(rlmp), 0);
return (_retval);
}
@@ -622,7 +622,7 @@ _audit_symbind(List *list, Rt_map *rlmp, Rt_map *dlmp, Sym *sym, uint_t ndx,
called++;
lflags = (*flags & ~(LA_SYMB_NOPLTENTER | LA_SYMB_NOPLTEXIT));
- leave(LIST(alp->al_lmp));
+ leave(LIST(alp->al_lmp), thr_flg_reenter);
sym->st_value = (*alp->al_symbind)(sym, ndx,
&(racp->ac_cookie), &(dacp->ac_cookie),
/* BEGIN CSTYLED */
@@ -632,7 +632,7 @@ _audit_symbind(List *list, Rt_map *rlmp, Rt_map *dlmp, Sym *sym, uint_t ndx,
&lflags);
#endif
/* END CSTYLED */
- (void) enter();
+ (void) enter(thr_flg_reenter);
/*
* If the auditor indicated that they did not want to process
@@ -712,9 +712,9 @@ _audit_preinit(List *list, Rt_map *clmp)
if ((acp = _audit_client(AUDINFO(clmp), alp->al_lmp)) == 0)
continue;
- leave(LIST(alp->al_lmp));
+ leave(LIST(alp->al_lmp), thr_flg_reenter);
(*alp->al_preinit)(&(acp->ac_cookie));
- (void) enter();
+ (void) enter(thr_flg_reenter);
}
}
diff --git a/usr/src/cmd/sgs/rtld/common/dlfcns.c b/usr/src/cmd/sgs/rtld/common/dlfcns.c
index 05a707232c..80b925dc53 100644
--- a/usr/src/cmd/sgs/rtld/common/dlfcns.c
+++ b/usr/src/cmd/sgs/rtld/common/dlfcns.c
@@ -113,7 +113,7 @@ _dlerror()
Rt_map *clmp;
int entry;
- entry = enter();
+ entry = enter(0);
clmp = _caller(caller(), CL_EXECDEF);
@@ -121,7 +121,7 @@ _dlerror()
lasterr = (char *)0;
if (entry)
- leave(LIST(clmp));
+ leave(LIST(clmp), 0);
return (error);
}
@@ -533,14 +533,14 @@ _dlclose(void *handle)
int error, entry;
Rt_map *clmp;
- entry = enter();
+ entry = enter(0);
clmp = _caller(caller(), CL_EXECDEF);
error = dlclose_check(handle, clmp);
if (entry)
- leave(LIST(clmp));
+ leave(LIST(clmp), 0);
return (error);
}
@@ -945,7 +945,7 @@ _dlopen(const char *path, int mode)
Grp_hdl *ghp;
Lm_list *lml;
- entry = enter();
+ entry = enter(0);
clmp = _caller(caller(), CL_EXECDEF);
lml = LIST(clmp);
@@ -953,7 +953,7 @@ _dlopen(const char *path, int mode)
ghp = dlmopen_check(lml, path, mode, clmp);
if (entry)
- leave(lml);
+ leave(lml, 0);
return ((void *)ghp);
}
@@ -969,14 +969,14 @@ _dlmopen(Lmid_t lmid, const char *path, int mode)
Rt_map *clmp;
Grp_hdl *ghp;
- entry = enter();
+ entry = enter(0);
clmp = _caller(caller(), CL_EXECDEF);
ghp = dlmopen_check((Lm_list *)lmid, path, mode, clmp);
if (entry)
- leave(LIST(clmp));
+ leave(LIST(clmp), 0);
return ((void *)ghp);
}
@@ -1439,7 +1439,7 @@ _dlsym(void *handle, const char *name)
Rt_map *clmp, *dlmp = 0;
void *addr;
- entry = enter();
+ entry = enter(0);
clmp = _caller(caller(), CL_EXECDEF);
@@ -1452,7 +1452,7 @@ _dlsym(void *handle, const char *name)
is_dep_init(dlmp, clmp);
if (entry)
- leave(LIST(clmp));
+ leave(LIST(clmp), 0);
return (addr);
}
@@ -1489,7 +1489,7 @@ _dladdr(void *addr, Dl_info *dlip)
int entry, error;
Rt_map *clmp;
- entry = enter();
+ entry = enter(0);
/*
* Use our calling technique to determine what object is associated
@@ -1506,7 +1506,7 @@ _dladdr(void *addr, Dl_info *dlip)
}
if (entry)
- leave(0);
+ leave(0, 0);
return (error);
}
@@ -1536,7 +1536,7 @@ _dladdr1(void *addr, Dl_info *dlip, void **info, int flags)
}
}
- entry = enter();
+ entry = enter(0);
/*
* Use our calling technique to determine what object is associated
@@ -1553,7 +1553,7 @@ _dladdr1(void *addr, Dl_info *dlip, void **info, int flags)
}
if (entry)
- leave(0);
+ leave(0, 0);
return (error);
}
@@ -1633,14 +1633,14 @@ _dldump(const char *ipath, const char *opath, int flags)
int error, entry;
Rt_map *clmp;
- entry = enter();
+ entry = enter(0);
clmp = _caller(caller(), CL_EXECDEF);
error = dldump_core(LIST(clmp), ipath, opath, flags);
if (entry)
- leave(LIST(clmp));
+ leave(LIST(clmp), 0);
return (error);
}
@@ -1907,13 +1907,13 @@ _dlinfo(void *handle, int request, void *p)
int error, entry;
Rt_map *clmp;
- entry = enter();
+ entry = enter(0);
clmp = _caller(caller(), CL_EXECDEF);
error = dlinfo_core(handle, request, p, clmp);
if (entry)
- leave(LIST(clmp));
+ leave(LIST(clmp), 0);
return (error);
}
diff --git a/usr/src/cmd/sgs/rtld/common/external.c b/usr/src/cmd/sgs/rtld/common/external.c
index c17b5f1f77..4b83bf0591 100644
--- a/usr/src/cmd/sgs/rtld/common/external.c
+++ b/usr/src/cmd/sgs/rtld/common/external.c
@@ -185,7 +185,9 @@
void
get_lcinterface(Rt_map *lmp, Lc_interface *funcs)
{
- int tag, threaded = 0;
+ int threaded = 0;
+ int version;
+ int tag;
Lm_list *lml;
Lc_desc *lcp;
@@ -293,7 +295,14 @@ get_lcinterface(Rt_map *lmp, Lc_interface *funcs)
if ((rtld_flags2 & RT_FL2_RTLDSEEN) == 0) {
rtld_flags2 |= RT_FL2_RTLDSEEN;
- if (funcs->ci_un.ci_val >= CI_V_FOUR) {
+ version = funcs->ci_un.ci_val;
+#if defined(CI_V_FIVE)
+ if (version >= CI_V_FIVE) {
+ thr_flg_nolock = THR_FLG_NOLOCK;
+ thr_flg_reenter = THR_FLG_REENTER;
+ }
+#endif
+ if (version >= CI_V_FOUR) {
Listnode *lnp;
Lm_list *lml2;
@@ -392,13 +401,15 @@ rt_get_extern(Lm_list *lml, Rt_map *lmp)
static int bindmask = 0;
int
-rt_bind_guard(int bindflag)
+rt_bind_guard(int flags)
{
int (*fptr)(int);
+ int bindflag;
if ((fptr = glcs[CI_BIND_GUARD].lc_un.lc_func) != NULL) {
- return ((*fptr)(bindflag));
+ return ((*fptr)(flags));
} else {
+ bindflag = (flags & THR_FLG_RTLD);
if ((bindflag & bindmask) == 0) {
bindmask |= bindflag;
return (1);
@@ -408,13 +419,15 @@ rt_bind_guard(int bindflag)
}
int
-rt_bind_clear(int bindflag)
+rt_bind_clear(int flags)
{
int (*fptr)(int);
+ int bindflag;
if ((fptr = glcs[CI_BIND_CLEAR].lc_un.lc_func) != NULL) {
- return ((*fptr)(bindflag));
+ return ((*fptr)(flags));
} else {
+ bindflag = (flags & THR_FLG_RTLD);
if (bindflag == 0)
return (bindmask);
else {
@@ -435,9 +448,9 @@ rt_thr_init(Lm_list *lml)
if ((fptr = (void (*)())lml->lm_lcs[CI_THRINIT].lc_un.lc_func) != 0) {
lml->lm_lcs[CI_THRINIT].lc_un.lc_func = 0;
- leave((Lm_list *)0);
+ leave((Lm_list *)0, thr_flg_reenter);
(*fptr)();
- (void) enter();
+ (void) enter(thr_flg_reenter);
}
}
diff --git a/usr/src/cmd/sgs/rtld/common/globals.c b/usr/src/cmd/sgs/rtld/common/globals.c
index 2b220be94e..2dc64eb35e 100644
--- a/usr/src/cmd/sgs/rtld/common/globals.c
+++ b/usr/src/cmd/sgs/rtld/common/globals.c
@@ -40,6 +40,8 @@
* Declarations of global variables used in ld.so.
*/
Rt_lock rtldlock;
+int thr_flg_nolock = 0;
+int thr_flg_reenter = 0;
/*
* Major link-map lists.
diff --git a/usr/src/cmd/sgs/rtld/common/remove.c b/usr/src/cmd/sgs/rtld/common/remove.c
index ae8c73283c..81746c777d 100644
--- a/usr/src/cmd/sgs/rtld/common/remove.c
+++ b/usr/src/cmd/sgs/rtld/common/remove.c
@@ -120,9 +120,9 @@ purge_exit_handlers(Lm_list *lml, Rt_map **tobj)
}
_addr->lb = _addr->ub = 0;
- leave(LIST(*tobj));
+ leave(LIST(*tobj), thr_flg_reenter);
error = (*fptr)(addr, (num - 1));
- (void) enter();
+ (void) enter(thr_flg_reenter);
/*
* If we fail to converse with libc, generate an error message to
diff --git a/usr/src/cmd/sgs/rtld/common/setup.c b/usr/src/cmd/sgs/rtld/common/setup.c
index e064a6925e..f97847e6fe 100644
--- a/usr/src/cmd/sgs/rtld/common/setup.c
+++ b/usr/src/cmd/sgs/rtld/common/setup.c
@@ -750,7 +750,7 @@ setup(char **envp, auxv_t *auxv, Word _flags, char *_platform, int _syspagsz,
argsinfo.dla_envp = envp;
argsinfo.dla_auxv = auxv;
- (void) enter();
+ (void) enter(0);
/*
* Add our two main link-maps to the dynlm_list
@@ -1048,7 +1048,7 @@ setup(char **envp, auxv_t *auxv, Word _flags, char *_platform, int _syspagsz,
* now that the auditing step has been called.
*/
if (rtld_flags & RT_FL_CONFGEN) {
- leave(LIST(mlmp));
+ leave(LIST(mlmp), 0);
return (mlmp);
}
@@ -1151,7 +1151,7 @@ setup(char **envp, auxv_t *auxv, Word _flags, char *_platform, int _syspagsz,
DBG_CALL(Dbg_util_call_main(mlmp));
rtld_flags |= RT_FL_OPERATION;
- leave(LIST(mlmp));
+ leave(LIST(mlmp), 0);
return (mlmp);
}
diff --git a/usr/src/cmd/sgs/rtld/common/util.c b/usr/src/cmd/sgs/rtld/common/util.c
index e67071632b..70d2918cdd 100644
--- a/usr/src/cmd/sgs/rtld/common/util.c
+++ b/usr/src/cmd/sgs/rtld/common/util.c
@@ -615,11 +615,7 @@ is_dep_ready(Rt_map *dlmp, Rt_map *clmp, int what)
((FLAGS(dlmp) & FLG_RT_INITDONE) == 0) &&
((FLAGS(clmp) & FLG_RT_INITFRST) == 0) &&
((tid = rt_thr_self()) != 0) && (THREADID(dlmp) != tid)) {
- while ((FLAGS(dlmp) & FLG_RT_INITDONE) == 0) {
- FLAGS1(dlmp) |= FL1_RT_INITWAIT;
- DBG_CALL(Dbg_util_wait(clmp, dlmp, what));
- (void) rt_cond_wait(CONDVAR(dlmp), &rtldlock);
- }
+ rtldexit(LIST(dlmp), 1);
}
}
@@ -656,9 +652,9 @@ call_array(Addr *array, uint_t arraysz, Rt_map *lmp, Word shtype)
DBG_CALL(Dbg_util_call_array(lmp, (void *)fptr, ndx, shtype));
- leave(LIST(lmp));
+ leave(LIST(lmp), thr_flg_reenter);
(*fptr)();
- (void) enter();
+ (void) enter(thr_flg_reenter);
}
}
@@ -724,9 +720,9 @@ call_init(Rt_map **tobj, int flag)
}
if (iptr) {
- leave(LIST(lmp));
+ leave(LIST(lmp), thr_flg_reenter);
(*iptr)();
- (void) enter();
+ (void) enter(thr_flg_reenter);
}
call_array(INITARRAY(lmp), INITARRAYSZ(lmp), lmp,
@@ -820,9 +816,9 @@ call_fini(Lm_list * lml, Rt_map ** tobj)
SHT_FINI_ARRAY);
if (fptr) {
- leave(LIST(lmp));
+ leave(LIST(lmp), thr_flg_reenter);
(*fptr)();
- (void) enter();
+ (void) enter(thr_flg_reenter);
}
}
@@ -875,7 +871,7 @@ atexit_fini()
Lm_list *lml;
Listnode *lnp;
- (void) enter();
+ (void) enter(0);
rtld_flags |= RT_FL_ATEXIT;
@@ -950,7 +946,7 @@ atexit_fini()
(tobj != (Rt_map **)S_ERROR))
call_fini(lml, tobj);
- leave(&lml_main);
+ leave(&lml_main, 0);
}
@@ -3007,7 +3003,7 @@ rtldexit(Lm_list * lml, int status)
MSG_STR_NL_SIZE);
}
}
- leave(lml);
+ leave(lml, 0);
(void) _lwp_kill(_lwp_self(), killsig);
}
_exit(status);
@@ -3152,10 +3148,11 @@ nu_map(Lm_list *lml, caddr_t addr, size_t len, int prot, int flags)
* entrance count.
*/
int
-enter(void)
+enter(int flags)
{
- if (rt_bind_guard(THR_FLG_RTLD)) {
- (void) rt_mutex_lock(&rtldlock);
+ if (rt_bind_guard(THR_FLG_RTLD | thr_flg_nolock | flags)) {
+ if (!thr_flg_nolock)
+ (void) rt_mutex_lock(&rtldlock);
if (rtld_flags & RT_FL_OPERATION)
ld_entry_cnt++;
return (1);
@@ -3395,7 +3392,7 @@ fmap_setup()
* released, and any locks dropped.
*/
void
-leave(Lm_list *lml)
+leave(Lm_list *lml, int flags)
{
Lm_list *elml = lml;
Rt_map *clmp;
@@ -3456,8 +3453,9 @@ leave(Lm_list *lml)
return;
if (rt_bind_clear(0) & THR_FLG_RTLD) {
- (void) rt_mutex_unlock(&rtldlock);
- (void) rt_bind_clear(THR_FLG_RTLD);
+ if (!thr_flg_nolock)
+ (void) rt_mutex_unlock(&rtldlock);
+ (void) rt_bind_clear(THR_FLG_RTLD | thr_flg_nolock | flags);
}
}
diff --git a/usr/src/cmd/sgs/rtld/i386/i386_elf.c b/usr/src/cmd/sgs/rtld/i386/i386_elf.c
index 7c9da3f9ae..3e9d58c00b 100644
--- a/usr/src/cmd/sgs/rtld/i386/i386_elf.c
+++ b/usr/src/cmd/sgs/rtld/i386/i386_elf.c
@@ -210,7 +210,7 @@ elf_bndr(Rt_map *lmp, ulong_t reloff, caddr_t from)
* further process a locking request. Under this recursion we disable
* tsort and cleanup activities.
*/
- entry = enter();
+ entry = enter(0);
lml = LIST(lmp);
if ((lmflags = lml->lm_flags) & LML_FLG_RTLDLM) {
@@ -342,7 +342,7 @@ elf_bndr(Rt_map *lmp, ulong_t reloff, caddr_t from)
*/
if (entry) {
is_dep_init(nlmp, lmp);
- leave(lml);
+ leave(lml, 0);
}
if (lmflags & LML_FLG_RTLDLM)
diff --git a/usr/src/cmd/sgs/rtld/sparc/sparc_a.out.c b/usr/src/cmd/sgs/rtld/sparc/sparc_a.out.c
index a1d6e811bd..e9e1734f35 100644
--- a/usr/src/cmd/sgs/rtld/sparc/sparc_a.out.c
+++ b/usr/src/cmd/sgs/rtld/sparc/sparc_a.out.c
@@ -83,7 +83,7 @@ aout_bndr(caddr_t pc)
* further process a locking request (see comments in completion()).
* Under this recursion we disable tsort and cleanup activities.
*/
- entry = enter();
+ entry = enter(0);
for (lmp = lml_main.lm_head; lmp; lmp = (Rt_map *)NEXT(lmp)) {
if (FCT(lmp) == &aout_fct) {
@@ -167,7 +167,7 @@ aout_bndr(caddr_t pc)
*/
if (entry) {
is_dep_init(nlmp, lmp);
- leave(lml);
+ leave(lml, 0);
}
return (symval);
diff --git a/usr/src/cmd/sgs/rtld/sparc/sparc_elf.c b/usr/src/cmd/sgs/rtld/sparc/sparc_elf.c
index e2fde63c4e..fb846dd55b 100644
--- a/usr/src/cmd/sgs/rtld/sparc/sparc_elf.c
+++ b/usr/src/cmd/sgs/rtld/sparc/sparc_elf.c
@@ -370,7 +370,7 @@ elf_bndr(Rt_map *lmp, ulong_t pltoff, caddr_t from)
* further process a locking request. Under this recursion we disable
* tsort and cleanup activities.
*/
- entry = enter();
+ entry = enter(0);
if ((lmflags = lml->lm_flags) & LML_FLG_RTLDLM) {
dbg_class = dbg_desc->d_class;
@@ -517,7 +517,7 @@ elf_bndr(Rt_map *lmp, ulong_t pltoff, caddr_t from)
*/
if (entry) {
is_dep_init(nlmp, lmp);
- leave(lml);
+ leave(lml, 0);
}
if (lmflags & LML_FLG_RTLDLM)
diff --git a/usr/src/cmd/sgs/rtld/sparcv9/sparc_elf.c b/usr/src/cmd/sgs/rtld/sparcv9/sparc_elf.c
index c64c42eb00..03621e18ac 100644
--- a/usr/src/cmd/sgs/rtld/sparcv9/sparc_elf.c
+++ b/usr/src/cmd/sgs/rtld/sparcv9/sparc_elf.c
@@ -501,7 +501,7 @@ elf_bndr(Rt_map *lmp, ulong_t pltoff, caddr_t from)
* further process a locking request. Under this recursion we disable
* tsort and cleanup activities.
*/
- entry = enter();
+ entry = enter(0);
if ((lmflags = lml->lm_flags) & LML_FLG_RTLDLM) {
dbg_class = dbg_desc->d_class;
@@ -664,7 +664,7 @@ elf_bndr(Rt_map *lmp, ulong_t pltoff, caddr_t from)
*/
if (entry) {
is_dep_init(nlmp, lmp);
- leave(LIST(lmp));
+ leave(LIST(lmp), 0);
}
if (lmflags & LML_FLG_RTLDLM)
diff --git a/usr/src/common/util/memcpy.c b/usr/src/common/util/memcpy.c
index 9580401335..3193287604 100644
--- a/usr/src/common/util/memcpy.c
+++ b/usr/src/common/util/memcpy.c
@@ -18,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -36,7 +37,6 @@
#if !defined(_KMDB) && !defined(_BOOT) && !defined(_KERNEL)
-#pragma weak _private_memcpy = _memcpy
#pragma weak memcpy = _memcpy
#include "synonyms.h"
diff --git a/usr/src/common/util/memset.c b/usr/src/common/util/memset.c
index 9258a5fa0f..69f6eb3967 100644
--- a/usr/src/common/util/memset.c
+++ b/usr/src/common/util/memset.c
@@ -18,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -31,7 +32,6 @@
#if !defined(_KMDB) && !defined(_BOOT) && !defined(_KERNEL)
-#pragma weak _private_memset = _memset
#pragma weak memset = _memset
#include "synonyms.h"
diff --git a/usr/src/lib/libc/Makefile b/usr/src/lib/libc/Makefile
index c41cd41da9..928fcc186d 100644
--- a/usr/src/lib/libc/Makefile
+++ b/usr/src/lib/libc/Makefile
@@ -19,7 +19,7 @@
# CDDL HEADER END
#
#
-# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -125,18 +125,13 @@ etc: $($(MACH)_ETC)
lib32: $(MACHLIBS) $(MACH)/$(LIB_PIC) $(VARIANTLIBS)
mkdir -p $(MACH)/i18n_pics
cd $(MACH)/i18n_pics ; $(AR) -x $(ROOTFS_LIBDIR)/libc_i18n.a
- $(CHECK_FNAMES) -s $(C_SYNONYMS_H) -l $(MACH)/$(DYNLIB) \
- $(MACH)/pics/*.o $(MACH)/i18n_pics/*.o
lib64: $(MACHLIBS64) $(MACH64)/$(LIB_PIC) $(VARIANTLIBS)
mkdir -p $(MACH64)/i18n_pics
cd $(MACH64)/i18n_pics ; $(AR) -x $(ROOTFS_LIBDIR64)/libc_i18n.a
- $(CHECK_FNAMES) -s $(C_SYNONYMS_H) -l $(MACH64)/$(DYNLIB) \
- $(MACH64)/pics/*.o $(MACH64)/i18n_pics/*.o
$(VARIANTLIBS): FRC
@cd $(@D); pwd; VERSION='$(VERSION)' $(MAKE) $(@F)
- $(CHECK_FNAMES) -s $(C_SYNONYMS_H) -l $(@D)/$(@F) $(@D)/pics/*.o
$($(MACH)_ETC): FRC
@cd $(@); pwd; $(MAKE) $(TARGET)
diff --git a/usr/src/lib/libc/amd64/crt/cerror.s b/usr/src/lib/libc/amd64/crt/cerror.s
index 3179467dc8..842c290b76 100644
--- a/usr/src/lib/libc/amd64/crt/cerror.s
+++ b/usr/src/lib/libc/amd64/crt/cerror.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -38,7 +38,7 @@
movl $EINTR, %eax
1:
pushq %rax
- call _private___errno
+ call ___errno
popq %rdx
movl %edx, (%rax)
movq $-1, %rax
diff --git a/usr/src/lib/libc/amd64/fp/fpstart.c b/usr/src/lib/libc/amd64/fp/fpstart.c
index e8ab8159eb..7648ced19a 100644
--- a/usr/src/lib/libc/amd64/fp/fpstart.c
+++ b/usr/src/lib/libc/amd64/fp/fpstart.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,15 +18,16 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright (c) 1990, 1991 UNIX System Laboratories, Inc.
- * Copyright (c) 1988 AT&T
- * All Rights Reserved
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
*/
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 1990, 1991 UNIX System Laboratories, Inc.
+ * Copyright (c) 1988 AT&T
+ * All Rights Reserved
*/
#pragma ident "%Z%%M% %I% %E% SMI"
@@ -48,8 +48,6 @@
#include <sys/sysi86.h> /* for SI86FPHW/SI86FPSTART definitions */
#include <sys/fp.h> /* for FPU_CW_INIT and SSE_MXCSR_INIT */
-extern int _private_sysi86();
-
int __flt_rounds; /* ANSI rounding mode */
void
@@ -62,7 +60,7 @@ __fpstart()
* SSE control words are (will be) set correctly.
* This "cannot fail".
*/
- (void) _private_sysi86(SI86FPSTART,
+ (void) sysi86(SI86FPSTART,
&_fp_hw, FPU_CW_INIT, SSE_MXCSR_INIT);
/*
diff --git a/usr/src/lib/libc/amd64/gen/memcpy.s b/usr/src/lib/libc/amd64/gen/memcpy.s
index 382d557319..1b77babf0a 100644
--- a/usr/src/lib/libc/amd64/gen/memcpy.s
+++ b/usr/src/lib/libc/amd64/gen/memcpy.s
@@ -40,8 +40,6 @@
#include "cache.h"
#include "proc64_id.h"
- ANSI_PRAGMA_WEAK2(_private_memcpy,memcpy,function)
-
#define L(s) .memcpy/**/s
/*
diff --git a/usr/src/lib/libc/amd64/gen/memset.s b/usr/src/lib/libc/amd64/gen/memset.s
index d13f19c8b0..618fcb874d 100644
--- a/usr/src/lib/libc/amd64/gen/memset.s
+++ b/usr/src/lib/libc/amd64/gen/memset.s
@@ -35,8 +35,6 @@
#include "cache.h"
#include "proc64_id.h"
- ANSI_PRAGMA_WEAK2(_private_memset,memset,function)
-
#define L(s) .memset/**/s
/*
diff --git a/usr/src/lib/libc/amd64/mapfile-vers b/usr/src/lib/libc/amd64/mapfile-vers
index fee9dbf1ba..edc3870fb0 100644
--- a/usr/src/lib/libc/amd64/mapfile-vers
+++ b/usr/src/lib/libc/amd64/mapfile-vers
@@ -19,7 +19,7 @@
# CDDL HEADER END
#
#
-# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -37,6 +37,7 @@ SUNW_1.22 {
dlmopen = FUNCTION FILTER /usr/lib/amd64/ld.so.1;
dlopen = FUNCTION FILTER /usr/lib/amd64/ld.so.1;
dlsym = FUNCTION FILTER /usr/lib/amd64/ld.so.1;
+ protected:
_SUNW_Unwind_DeleteException;
_SUNW_Unwind_ForcedUnwind;
_SUNW_Unwind_GetCFA;
@@ -68,6 +69,57 @@ SUNW_1.22 {
SUNW_0.7 {
global:
+ _altzone;
+ calloc = NODIRECT;
+ _ctype;
+ __ctype;
+ daylight;
+ _daylight;
+ environ = NODIRECT;
+ _environ = NODIRECT;
+ errno = NODIRECT;
+ free = NODIRECT;
+ frexp = FUNCTION FILTER libm.so.2;
+ getdate_err;
+ _getdate_err;
+ __huge_val;
+ _iob;
+ __iob;
+ isnan = FUNCTION FILTER libm.so.2;
+ _isnan = FUNCTION FILTER libm.so.2;
+ isnand = FUNCTION FILTER libm.so.2;
+ _isnand = FUNCTION FILTER libm.so.2;
+ ldexp = FUNCTION FILTER libm.so.2;
+ logb = FUNCTION FILTER libm.so.2;
+ malloc = NODIRECT;
+ modf = FUNCTION FILTER libm.so.2;
+ _modf = FUNCTION FILTER libm.so.2;
+ nextafter = FUNCTION FILTER libm.so.2;
+ _nextafter = FUNCTION FILTER libm.so.2;
+ _numeric;
+ optarg;
+ opterr;
+ optind;
+ optopt;
+ realloc = NODIRECT;
+ scalb = FUNCTION FILTER libm.so.2;
+ _scalb = FUNCTION FILTER libm.so.2;
+ _sibuf;
+ _sobuf;
+ _sys_buslist;
+ _sys_cldlist;
+ _sys_fpelist;
+ _sys_segvlist;
+ _sys_siginfolistp;
+ _sys_siglist;
+ _sys_siglistn;
+ _sys_siglistp;
+ _sys_traplist;
+ timezone;
+ _timezone;
+ tzname;
+ _tzname;
+ protected:
abort;
abs;
access;
@@ -78,7 +130,6 @@ SUNW_0.7 {
_addseverity;
alarm;
_alarm;
- _altzone;
asctime;
asctime_r;
_assert;
@@ -89,7 +140,6 @@ SUNW_0.7 {
atol;
bsearch;
__builtin_alloca;
- calloc = NODIRECT;
catclose;
_catclose;
catgets;
@@ -116,7 +166,7 @@ SUNW_0.7 {
clearerr;
clock;
_close;
- close = NODIRECT;
+ close;
closedir;
_closedir;
creat;
@@ -126,12 +176,8 @@ SUNW_0.7 {
ctermid;
ctime;
ctime_r;
- _ctype;
- __ctype;
cuserid;
_cuserid;
- daylight;
- _daylight;
difftime;
div;
dup;
@@ -142,9 +188,6 @@ SUNW_0.7 {
_encrypt;
endgrent;
endpwent;
- environ = NODIRECT;
- _environ = NODIRECT;
- errno = NODIRECT;
___errno;
execl;
_execl;
@@ -196,16 +239,14 @@ SUNW_0.7 {
_fmtmsg;
fopen;
_fork;
- fork = NODIRECT;
+ fork;
fpathconf;
_fpathconf;
fprintf;
fputc;
fputs;
fread;
- free = NODIRECT;
freopen;
- frexp = FUNCTION FILTER libm.so.2;
fscanf;
fseek;
fsetpos;
@@ -230,8 +271,6 @@ SUNW_0.7 {
_getcwd;
getdate;
_getdate;
- getdate_err;
- _getdate_err;
getegid;
_getegid;
getenv;
@@ -298,11 +337,8 @@ SUNW_0.7 {
_hdestroy;
hsearch;
_hsearch;
- __huge_val;
initgroups;
_initgroups;
- _iob;
- __iob;
ioctl;
_ioctl;
isalnum;
@@ -317,10 +353,6 @@ SUNW_0.7 {
isdigit;
isgraph;
islower;
- isnan = FUNCTION FILTER libm.so.2;
- _isnan = FUNCTION FILTER libm.so.2;
- isnand = FUNCTION FILTER libm.so.2;
- _isnand = FUNCTION FILTER libm.so.2;
isprint;
ispunct;
isspace;
@@ -331,7 +363,6 @@ SUNW_0.7 {
labs;
lchown;
_lchown;
- ldexp = FUNCTION FILTER libm.so.2;
ldiv;
lfind;
_lfind;
@@ -342,7 +373,6 @@ SUNW_0.7 {
localtime_r;
lockf;
_lockf;
- logb = FUNCTION FILTER libm.so.2;
longjmp;
lsearch;
_lsearch;
@@ -352,7 +382,6 @@ SUNW_0.7 {
_lstat;
makecontext;
_makecontext;
- malloc = NODIRECT;
mblen;
mbstowcs;
mbtowc;
@@ -378,8 +407,6 @@ SUNW_0.7 {
_mlock;
mmap;
_mmap;
- modf = FUNCTION FILTER libm.so.2;
- _modf = FUNCTION FILTER libm.so.2;
monitor;
_monitor;
mount;
@@ -402,23 +429,16 @@ SUNW_0.7 {
_munmap;
_mutex_held = NODYNSORT;
_mutex_lock = NODYNSORT;
- nextafter = FUNCTION FILTER libm.so.2;
- _nextafter = FUNCTION FILTER libm.so.2;
nftw;
_nftw;
nice;
_nice;
nl_langinfo;
_nl_langinfo;
- _numeric;
open;
_open;
opendir;
_opendir;
- optarg;
- opterr;
- optind;
- optopt;
pathconf;
_pathconf;
pause;
@@ -464,7 +484,6 @@ SUNW_0.7 {
_readlink;
readv;
_readv;
- realloc = NODIRECT;
remove;
rename;
_rename;
@@ -476,8 +495,6 @@ SUNW_0.7 {
_rw_read_held;
_rw_write_held;
sbrk;
- scalb = FUNCTION FILTER libm.so.2;
- _scalb = FUNCTION FILTER libm.so.2;
scanf;
seekdir;
_seekdir;
@@ -522,9 +539,8 @@ SUNW_0.7 {
_shmdt;
shmget;
_shmget;
- _sibuf;
- sigaction = NODIRECT;
- _sigaction = NODIRECT NODYNSORT;
+ sigaction;
+ _sigaction = NODYNSORT;
sigaddset;
_sigaddset;
sigaltstack;
@@ -564,7 +580,6 @@ SUNW_0.7 {
_sigsuspend;
sleep;
_sleep;
- _sobuf;
sprintf;
srand;
srand48;
@@ -607,21 +622,12 @@ SUNW_0.7 {
_symlink;
sync;
_sync;
- _sys_buslist;
_syscall;
- _sys_cldlist;
sysconf;
_sysconf;
- _sys_fpelist;
sysinfo;
_sysinfo;
- _sys_segvlist;
- _sys_siginfolistp;
- _sys_siglist;
- _sys_siglistn;
- _sys_siglistp;
system;
- _sys_traplist;
tcdrain;
_tcdrain;
tcflow;
@@ -654,8 +660,6 @@ SUNW_0.7 {
_time;
times;
_times;
- timezone;
- _timezone;
tmpfile;
tmpnam;
toascii;
@@ -670,8 +674,6 @@ SUNW_0.7 {
ttyname_r;
twalk;
_twalk;
- tzname;
- _tzname;
tzset;
_tzset;
ulimit;
@@ -708,7 +710,7 @@ SUNW_0.7 {
} SYSVABI_1.3;
SYSVABI_1.3 {
- global:
+ protected:
_ctermid;
__flt_rounds;
_fpstart;
@@ -724,9 +726,6 @@ SYSVABI_1.3 {
SUNWprivate_1.1 {
global:
- _D_cplx_lr_div;
- _D_cplx_lr_div_ix;
- _D_cplx_lr_div_rx;
_dladdr = FUNCTION FILTER /usr/lib/amd64/ld.so.1;
_dladdr1 = FUNCTION FILTER /usr/lib/amd64/ld.so.1;
_dlamd64getunwind = FUNCTION FILTER /usr/lib/amd64/ld.so.1;
@@ -737,15 +736,16 @@ SUNWprivate_1.1 {
_dlmopen = FUNCTION FILTER /usr/lib/amd64/ld.so.1;
_dlopen = FUNCTION FILTER /usr/lib/amd64/ld.so.1;
_dlsym = FUNCTION FILTER /usr/lib/amd64/ld.so.1;
+ _ld_libc = FUNCTION FILTER /usr/lib/amd64/ld.so.1;
+ protected:
+ _D_cplx_lr_div;
+ _D_cplx_lr_div_ix;
+ _D_cplx_lr_div_rx;
_F_cplx_lr_div;
_F_cplx_lr_div_ix;
_F_cplx_lr_div_rx;
__fltrounds;
__fseterror_u;
- gtty;
- _gtty;
- _hasmntopt;
- _ld_libc = FUNCTION FILTER /usr/lib/amd64/ld.so.1;
_memcmp;
_memcpy;
_memmove;
@@ -766,6 +766,5 @@ SUNWprivate_1.1 {
__xtoull;
local:
- _private_sysi86 = NODYNSORT;
___tls_get_addr = NODYNSORT;
};
diff --git a/usr/src/lib/libc/amd64/sys/__getcontext.s b/usr/src/lib/libc/amd64/sys/__getcontext.s
index 8073ae148a..7f3eca8787 100644
--- a/usr/src/lib/libc/amd64/sys/__getcontext.s
+++ b/usr/src/lib/libc/amd64/sys/__getcontext.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -36,8 +36,6 @@
#include "SYS.h"
- ANSI_PRAGMA_WEAK2(__getcontext_syscall,__getcontext,function)
-
ENTRY(__getcontext)
movq %rdi, %rsi
movq $0, %rdi
diff --git a/usr/src/lib/libc/amd64/sys/_lwp_mutex_unlock.s b/usr/src/lib/libc/amd64/sys/_lwp_mutex_unlock.s
index b9f30fc2d1..bb8723a8ae 100644
--- a/usr/src/lib/libc/amd64/sys/_lwp_mutex_unlock.s
+++ b/usr/src/lib/libc/amd64/sys/_lwp_mutex_unlock.s
@@ -20,7 +20,7 @@
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -35,8 +35,6 @@
#include "SYS.h"
#include <../assym.h>
- ANSI_PRAGMA_WEAK2(_private_lwp_mutex_unlock,_lwp_mutex_unlock,function)
-
ENTRY(_lwp_mutex_unlock)
movq %rdi, %rax
addq $MUTEX_LOCK_WORD, %rax
diff --git a/usr/src/lib/libc/amd64/sys/door.s b/usr/src/lib/libc/amd64/sys/door.s
index 1e1789d911..381e14b503 100644
--- a/usr/src/lib/libc/amd64/sys/door.s
+++ b/usr/src/lib/libc/amd64/sys/door.s
@@ -142,7 +142,7 @@ door_restart:
cmpl $EINTR, %eax /* interrupted while waiting? */
jne __cerror /* if not, return the error */
- call _private_getpid /* get current process id */
+ call getpid /* get current process id */
movq _daref_(door_create_pid), %rdx
movl 0(%rdx), %edx
cmpl %eax, %edx /* same process? */
diff --git a/usr/src/lib/libc/amd64/sys/getcontext.s b/usr/src/lib/libc/amd64/sys/getcontext.s
index b3ffb4973e..b5aedfe8c5 100644
--- a/usr/src/lib/libc/amd64/sys/getcontext.s
+++ b/usr/src/lib/libc/amd64/sys/getcontext.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -46,7 +46,7 @@
#define GETCONTEXT_IMPL(offset) \
pushq %rdi; /* preserve the ucontext_t pointer */ \
- call __getcontext_syscall; \
+ call __getcontext; \
/* call getcontext: syscall */ \
popq %rdx; \
andl %eax, %eax; /* if (error_return_from_syscall) */ \
@@ -75,8 +75,6 @@
* getcontext(ucontext_t *ucp)
*/
- ANSI_PRAGMA_WEAK2(_private_getcontext,getcontext,function)
-
ENTRY(getcontext)
GETCONTEXT_IMPL(0)
ret
@@ -93,6 +91,6 @@
/* call setcontext */
popq %rdi
- call _private_setcontext /* call setcontext */
+ call setcontext
ret
SET_SIZE(swapcontext)
diff --git a/usr/src/lib/libc/amd64/sys/sysi86.s b/usr/src/lib/libc/amd64/sys/sysi86.s
index ba82c1b0a3..14e47db53c 100644
--- a/usr/src/lib/libc/amd64/sys/sysi86.s
+++ b/usr/src/lib/libc/amd64/sys/sysi86.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -34,8 +34,6 @@
#include "SYS.h"
- ANSI_PRAGMA_WEAK2(_private_sysi86,_sysi86,function)
-
ENTRY(_sysi86)
SYSTRAP_RVAL1(sysi86)
SYSCERROR
diff --git a/usr/src/lib/libc/amd64/threads/asm_subr.s b/usr/src/lib/libc/amd64/threads/asm_subr.s
index 947bf63cb8..181b7b050e 100644
--- a/usr/src/lib/libc/amd64/threads/asm_subr.s
+++ b/usr/src/lib/libc/amd64/threads/asm_subr.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -80,11 +80,6 @@
RET
SET_SIZE(__lwp_unpark_all)
- ENTRY(lwp_yield)
- SYSTRAP_RVAL1(yield)
- RETC
- SET_SIZE(lwp_yield)
-
/*
* __sighndlr(int sig, siginfo_t *si, ucontext_t *uc, void (*hndlr)())
*
diff --git a/usr/src/lib/libc/amd64/threads/machdep.c b/usr/src/lib/libc/amd64/threads/machdep.c
index cd96dfb1d9..b9b186398e 100644
--- a/usr/src/lib/libc/amd64/threads/machdep.c
+++ b/usr/src/lib/libc/amd64/threads/machdep.c
@@ -42,7 +42,7 @@ setup_context(ucontext_t *ucp, void *(*func)(ulwp_t *),
uint64_t *stack;
/* clear the context */
- (void) _memset(ucp, 0, sizeof (*ucp));
+ (void) memset(ucp, 0, sizeof (*ucp));
/* setup to store the current thread pointer in %fs */
ucp->uc_mcontext.gregs[REG_FSBASE] = (greg_t)ulwp;
@@ -78,7 +78,7 @@ _thr_setup(ulwp_t *self)
self->ul_ustack.ss_sp = (void *)(self->ul_stktop - self->ul_stksiz);
self->ul_ustack.ss_size = self->ul_stksiz;
self->ul_ustack.ss_flags = 0;
- (void) _private_setustack(&self->ul_ustack);
+ (void) setustack(&self->ul_ustack);
update_sched(self);
tls_setup();
@@ -164,7 +164,7 @@ __csigsetjmp(sigjmp_buf env, int savemask, gregset_t rs)
ucp->uc_sigmask = self->ul_sigmask;
exit_critical(self);
}
- (void) _memcpy(ucp->uc_mcontext.gregs, rs, _NGREG * sizeof (greg_t));
+ (void) memcpy(ucp->uc_mcontext.gregs, rs, _NGREG * sizeof (greg_t));
return (0);
}
diff --git a/usr/src/lib/libc/common/sys/close.s b/usr/src/lib/libc/common/sys/close.s
index c88472019c..bf162d4e27 100644
--- a/usr/src/lib/libc/common/sys/close.s
+++ b/usr/src/lib/libc/common/sys/close.s
@@ -36,7 +36,6 @@
#include "SYS.h"
- ANSI_PRAGMA_WEAK2(_private_close,__close,function)
SYSCALL2_RVAL1(__close,close)
RETC
SET_SIZE(__close)
diff --git a/usr/src/lib/libc/common/sys/execve.s b/usr/src/lib/libc/common/sys/execve.s
index 8a6312a989..7c92ac99d7 100644
--- a/usr/src/lib/libc/common/sys/execve.s
+++ b/usr/src/lib/libc/common/sys/execve.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,15 +18,15 @@
*
* CDDL HEADER END
*/
-/* Copyright (c) 1988 AT&T */
-/* All Rights Reserved */
-
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/* Copyright (c) 1988 AT&T */
+/* All Rights Reserved */
+
#pragma ident "%Z%%M% %I% %E% SMI"
.file "%M%"
@@ -45,6 +44,5 @@
#include "SYS.h"
- ANSI_PRAGMA_WEAK2(_private_execve,execve,function)
SYSCALL_RVAL1(execve)
SET_SIZE(execve)
diff --git a/usr/src/lib/libc/common/sys/exit.s b/usr/src/lib/libc/common/sys/exit.s
index 3ef2f157b9..5c259bcdde 100644
--- a/usr/src/lib/libc/common/sys/exit.s
+++ b/usr/src/lib/libc/common/sys/exit.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,15 +18,15 @@
*
* CDDL HEADER END
*/
-/* Copyright (c) 1988 AT&T */
-/* All Rights Reserved */
-
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/* Copyright (c) 1988 AT&T */
+/* All Rights Reserved */
+
#pragma ident "%Z%%M% %I% %E% SMI"
.file "%M%"
@@ -48,7 +47,6 @@
#include "SYS.h"
- ANSI_PRAGMA_WEAK2(_private_exit,_exit,function)
ANSI_PRAGMA_WEAK2(_Exit,_exit,function)
ENTRY(_exit)
SYSTRAP_RVAL1(exit)
diff --git a/usr/src/lib/libc/common/sys/fstat.s b/usr/src/lib/libc/common/sys/fstat.s
index 00740c5cd0..0bc6d69be0 100644
--- a/usr/src/lib/libc/common/sys/fstat.s
+++ b/usr/src/lib/libc/common/sys/fstat.s
@@ -46,7 +46,6 @@
#if !defined(_LARGEFILE_SOURCE)
- ANSI_PRAGMA_WEAK2(_private_fstat,fstat,function)
SYSCALL_RVAL1(fstat)
RETC
SET_SIZE(fstat)
@@ -56,7 +55,6 @@
/* C library -- fstat64 transitional large file API */
/* int fstat64 (int fildes, struct stat64 *buf) */
- ANSI_PRAGMA_WEAK2(_private_fstat64,fstat64,function)
SYSCALL_RVAL1(fstat64)
RETC
SET_SIZE(fstat64)
diff --git a/usr/src/lib/libc/common/sys/geteuid.s b/usr/src/lib/libc/common/sys/geteuid.s
index 89dd1f964c..4cf6f688fc 100644
--- a/usr/src/lib/libc/common/sys/geteuid.s
+++ b/usr/src/lib/libc/common/sys/geteuid.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,15 +18,15 @@
*
* CDDL HEADER END
*/
-/* Copyright (c) 1988 AT&T */
-/* All Rights Reserved */
-
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/* Copyright (c) 1988 AT&T */
+/* All Rights Reserved */
+
#pragma ident "%Z%%M% %I% %E% SMI"
.file "%M%"
@@ -43,8 +42,6 @@
#include "SYS.h"
- ANSI_PRAGMA_WEAK2(_private_geteuid,_geteuid,function)
-
ENTRY(geteuid) /* shared syscall: rval1 = uid */
SYSTRAP_RVAL2(getuid) /* rval2 = euid */
RET2
diff --git a/usr/src/lib/libc/common/sys/getgid.s b/usr/src/lib/libc/common/sys/getgid.s
index 8ee68e6a1c..02b4814ea8 100644
--- a/usr/src/lib/libc/common/sys/getgid.s
+++ b/usr/src/lib/libc/common/sys/getgid.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,15 +18,15 @@
*
* CDDL HEADER END
*/
-/* Copyright (c) 1988 AT&T */
-/* All Rights Reserved */
-
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/* Copyright (c) 1988 AT&T */
+/* All Rights Reserved */
+
#pragma ident "%Z%%M% %I% %E% SMI"
.file "%M%"
@@ -41,7 +40,6 @@
#include "SYS.h"
- ANSI_PRAGMA_WEAK2(_private_getgid,_getgid,function)
SYSCALL_NOERROR_RVAL1(getgid)
RET
SET_SIZE(getgid)
diff --git a/usr/src/lib/libc/common/sys/getpid.s b/usr/src/lib/libc/common/sys/getpid.s
index bd9b8f0f64..78abed2e09 100644
--- a/usr/src/lib/libc/common/sys/getpid.s
+++ b/usr/src/lib/libc/common/sys/getpid.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,15 +18,15 @@
*
* CDDL HEADER END
*/
-/* Copyright (c) 1988 AT&T */
-/* All Rights Reserved */
-
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/* Copyright (c) 1988 AT&T */
+/* All Rights Reserved */
+
#pragma ident "%Z%%M% %I% %E% SMI"
.file "%M%"
@@ -41,7 +40,6 @@
#include "SYS.h"
- ANSI_PRAGMA_WEAK2(_private_getpid,_getpid,function)
SYSCALL_NOERROR_RVAL1(getpid)
RET
SET_SIZE(getpid)
diff --git a/usr/src/lib/libc/common/sys/getrlimit.s b/usr/src/lib/libc/common/sys/getrlimit.s
index 40952add04..56cd868b74 100644
--- a/usr/src/lib/libc/common/sys/getrlimit.s
+++ b/usr/src/lib/libc/common/sys/getrlimit.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,15 +18,15 @@
*
* CDDL HEADER END
*/
-/* Copyright (c) 1988 AT&T */
-/* All Rights Reserved */
-
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/* Copyright (c) 1988 AT&T */
+/* All Rights Reserved */
+
#pragma ident "%Z%%M% %I% %E% SMI"
.file "%M%"
@@ -47,7 +46,6 @@
#if !defined(_LARGEFILE_SOURCE)
- ANSI_PRAGMA_WEAK2(_private_getrlimit,getrlimit,function)
SYSCALL_RVAL1(getrlimit)
RETC
SET_SIZE(getrlimit)
diff --git a/usr/src/lib/libc/common/sys/getuid.s b/usr/src/lib/libc/common/sys/getuid.s
index e7e5b29c7e..85cbdaebae 100644
--- a/usr/src/lib/libc/common/sys/getuid.s
+++ b/usr/src/lib/libc/common/sys/getuid.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,15 +18,15 @@
*
* CDDL HEADER END
*/
-/* Copyright (c) 1988 AT&T */
-/* All Rights Reserved */
-
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/* Copyright (c) 1988 AT&T */
+/* All Rights Reserved */
+
#pragma ident "%Z%%M% %I% %E% SMI"
.file "%M%"
@@ -41,7 +40,6 @@
#include "SYS.h"
- ANSI_PRAGMA_WEAK2(_private_getuid,_getuid,function)
SYSCALL_NOERROR_RVAL1(getuid)
RET
SET_SIZE(getuid)
diff --git a/usr/src/lib/libc/common/sys/ioctl.s b/usr/src/lib/libc/common/sys/ioctl.s
index 94e2e3ceae..647e64b332 100644
--- a/usr/src/lib/libc/common/sys/ioctl.s
+++ b/usr/src/lib/libc/common/sys/ioctl.s
@@ -40,7 +40,6 @@
#include "SYS.h"
- ANSI_PRAGMA_WEAK2(_private_ioctl,ioctl,function)
SYSCALL_RESTART_RVAL1(ioctl)
RET
SET_SIZE(ioctl)
diff --git a/usr/src/lib/libc/common/sys/mmap.s b/usr/src/lib/libc/common/sys/mmap.s
index e8df86b7ad..0a5742efdc 100644
--- a/usr/src/lib/libc/common/sys/mmap.s
+++ b/usr/src/lib/libc/common/sys/mmap.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,15 +18,15 @@
*
* CDDL HEADER END
*/
-/* Copyright (c) 1988 AT&T */
-/* All Rights Reserved */
-
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/* Copyright (c) 1988 AT&T */
+/* All Rights Reserved */
+
#pragma ident "%Z%%M% %I% %E% SMI"
.file "%M%"
@@ -51,8 +50,6 @@
* int flags, int fd, off_t off)
*/
- ANSI_PRAGMA_WEAK2(_private_mmap,mmap,function)
-
ENTRY(mmap)
#if defined(__sparc)
/* this depends upon the _MAP_NEW flag being in the top bits */
diff --git a/usr/src/lib/libc/common/sys/mprotect.s b/usr/src/lib/libc/common/sys/mprotect.s
index 6843b12767..70bdf76237 100644
--- a/usr/src/lib/libc/common/sys/mprotect.s
+++ b/usr/src/lib/libc/common/sys/mprotect.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,15 +18,15 @@
*
* CDDL HEADER END
*/
-/* Copyright (c) 1988 AT&T */
-/* All Rights Reserved */
-
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/* Copyright (c) 1988 AT&T */
+/* All Rights Reserved */
+
#pragma ident "%Z%%M% %I% %E% SMI"
.file "%M%"
@@ -41,7 +40,6 @@
#include "SYS.h"
- ANSI_PRAGMA_WEAK2(_private_mprotect,mprotect,function)
SYSCALL_RVAL1(mprotect)
RETC
SET_SIZE(mprotect)
diff --git a/usr/src/lib/libc/common/sys/munmap.s b/usr/src/lib/libc/common/sys/munmap.s
index 5180b30ce2..569393521b 100644
--- a/usr/src/lib/libc/common/sys/munmap.s
+++ b/usr/src/lib/libc/common/sys/munmap.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,15 +18,15 @@
*
* CDDL HEADER END
*/
-/* Copyright (c) 1988 AT&T */
-/* All Rights Reserved */
-
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/* Copyright (c) 1988 AT&T */
+/* All Rights Reserved */
+
#pragma ident "%Z%%M% %I% %E% SMI"
.file "%M%"
@@ -41,7 +40,6 @@
#include "SYS.h"
- ANSI_PRAGMA_WEAK2(_private_munmap,munmap,function)
SYSCALL_RVAL1(munmap)
RETC
SET_SIZE(munmap)
diff --git a/usr/src/lib/libc/common/sys/priocntlset.s b/usr/src/lib/libc/common/sys/priocntlset.s
index 78099580d9..f4ef612516 100644
--- a/usr/src/lib/libc/common/sys/priocntlset.s
+++ b/usr/src/lib/libc/common/sys/priocntlset.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,15 +18,15 @@
*
* CDDL HEADER END
*/
-/* Copyright (c) 1988 AT&T */
-/* All Rights Reserved */
-
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/* Copyright (c) 1988 AT&T */
+/* All Rights Reserved */
+
#pragma ident "%Z%%M% %I% %E% SMI"
.file "%M%"
@@ -37,7 +36,6 @@
#include "SYS.h"
- ANSI_PRAGMA_WEAK2(_private__priocntlset,__priocntlset,function)
SYSCALL2_RVAL1(__priocntlset,priocntlsys)
RET
SET_SIZE(__priocntlset)
diff --git a/usr/src/lib/libc/common/sys/setgid.s b/usr/src/lib/libc/common/sys/setgid.s
index a12dc5adcf..cb49aadb16 100644
--- a/usr/src/lib/libc/common/sys/setgid.s
+++ b/usr/src/lib/libc/common/sys/setgid.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,15 +18,15 @@
*
* CDDL HEADER END
*/
-/* Copyright (c) 1988 AT&T */
-/* All Rights Reserved */
-
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/* Copyright (c) 1988 AT&T */
+/* All Rights Reserved */
+
#pragma ident "%Z%%M% %I% %E% SMI"
.file "%M%"
@@ -41,7 +40,6 @@
#include "SYS.h"
- ANSI_PRAGMA_WEAK2(_private_setgid,_setgid,function)
SYSCALL_RVAL1(setgid)
RETC
SET_SIZE(setgid)
diff --git a/usr/src/lib/libc/common/sys/setuid.s b/usr/src/lib/libc/common/sys/setuid.s
index 115ef8bf8f..ca2e76b00d 100644
--- a/usr/src/lib/libc/common/sys/setuid.s
+++ b/usr/src/lib/libc/common/sys/setuid.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,15 +18,15 @@
*
* CDDL HEADER END
*/
-/* Copyright (c) 1988 AT&T */
-/* All Rights Reserved */
-
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/* Copyright (c) 1988 AT&T */
+/* All Rights Reserved */
+
#pragma ident "%Z%%M% %I% %E% SMI"
.file "%M%"
@@ -41,7 +40,6 @@
#include "SYS.h"
- ANSI_PRAGMA_WEAK2(_private_setuid,_setuid,function)
SYSCALL_RVAL1(setuid)
RETC
SET_SIZE(setuid)
diff --git a/usr/src/lib/libc/common/sys/stat.s b/usr/src/lib/libc/common/sys/stat.s
index e311c337f0..4b392b037a 100644
--- a/usr/src/lib/libc/common/sys/stat.s
+++ b/usr/src/lib/libc/common/sys/stat.s
@@ -46,7 +46,6 @@
#if !defined(_LARGEFILE_SOURCE)
- ANSI_PRAGMA_WEAK2(_private_stat,stat,function)
SYSCALL_RVAL1(stat)
RETC
SET_SIZE(stat)
@@ -56,7 +55,6 @@
/* C library -- stat64 - transitional API */
/* int stat64 (const char *path, struct stat64 *buf); */
- ANSI_PRAGMA_WEAK2(_private_stat64,stat64,function)
SYSCALL_RVAL1(stat64)
RETC
SET_SIZE(stat64)
diff --git a/usr/src/lib/libc/i386/crt/cerror.s b/usr/src/lib/libc/i386/crt/cerror.s
index 39b7a05d02..ce474aaf2b 100644
--- a/usr/src/lib/libc/i386/crt/cerror.s
+++ b/usr/src/lib/libc/i386/crt/cerror.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -38,7 +38,7 @@
movl $EINTR, %eax
1:
pushl %eax
- call _private___errno
+ call ___errno
popl %edx
movl %edx, (%eax)
movl $-1, %eax
diff --git a/usr/src/lib/libc/i386/crt/cerror64.s b/usr/src/lib/libc/i386/crt/cerror64.s
index 5aceddc08a..b81943a956 100644
--- a/usr/src/lib/libc/i386/crt/cerror64.s
+++ b/usr/src/lib/libc/i386/crt/cerror64.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -38,7 +38,7 @@
movl $EINTR, %eax
1:
pushl %eax
- call _private___errno
+ call ___errno
popl %edx
movl %edx, (%eax)
movl $-1, %eax
diff --git a/usr/src/lib/libc/i386/fp/fpstart.c b/usr/src/lib/libc/i386/fp/fpstart.c
index b1be1eeee8..7c5a1bb291 100644
--- a/usr/src/lib/libc/i386/fp/fpstart.c
+++ b/usr/src/lib/libc/i386/fp/fpstart.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,15 +18,16 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright (c) 1990, 1991 UNIX System Laboratories, Inc.
- * Copyright (c) 1988 AT&T
- * All Rights Reserved
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
*/
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 1990, 1991 UNIX System Laboratories, Inc.
+ * Copyright (c) 1988 AT&T
+ * All Rights Reserved
*/
#pragma ident "%Z%%M% %I% %E% SMI"
@@ -51,7 +51,6 @@
#include <sys/sysi86.h> /* for SI86FPHW/SI86FPSTART definitions */
#include <sys/fp.h> /* for FPU_CW_INIT and SSE_MXCSR_INIT */
-extern int _private_sysi86();
extern int __fltrounds();
int _fp_hw; /* default: bss: 0 == no hardware */
@@ -65,7 +64,7 @@ __fpstart()
* query OS for HW status and ensure the x87 and (optional)
* SSE control words are (will be) set correctly.
*/
- if ((_sse_hw = _private_sysi86(SI86FPSTART,
+ if ((_sse_hw = sysi86(SI86FPSTART,
&_fp_hw, FPU_CW_INIT, SSE_MXCSR_INIT)) == -1) {
extern void _putcw();
@@ -73,7 +72,7 @@ __fpstart()
* (fallback to old syscall on old kernels)
*/
_sse_hw = 0;
- (void) _private_sysi86(SI86FPHW, &_fp_hw);
+ (void) sysi86(SI86FPHW, &_fp_hw);
_putcw(0x133f);
}
diff --git a/usr/src/lib/libc/i386/gen/memcpy.s b/usr/src/lib/libc/i386/gen/memcpy.s
index 933d928cdd..a86d6b5da1 100644
--- a/usr/src/lib/libc/i386/gen/memcpy.s
+++ b/usr/src/lib/libc/i386/gen/memcpy.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -35,8 +35,6 @@
#include "SYS.h"
- ANSI_PRAGMA_WEAK2(_private_memcpy,memcpy,function)
-
ENTRY(memcpy)
movl %edi,%edx / save register variables
pushl %esi
diff --git a/usr/src/lib/libc/i386/gen/memset.s b/usr/src/lib/libc/i386/gen/memset.s
index ba8c30923a..0ddfb50017 100644
--- a/usr/src/lib/libc/i386/gen/memset.s
+++ b/usr/src/lib/libc/i386/gen/memset.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -34,8 +34,6 @@
#include "SYS.h"
- ANSI_PRAGMA_WEAK2(_private_memset,memset,function)
-
ENTRY(memset)
pushl %edi / save register variable
movl 8(%esp),%edi / %edi = string address
diff --git a/usr/src/lib/libc/i386/mapfile-vers b/usr/src/lib/libc/i386/mapfile-vers
index 1a04ef290f..2229e9d71b 100644
--- a/usr/src/lib/libc/i386/mapfile-vers
+++ b/usr/src/lib/libc/i386/mapfile-vers
@@ -26,7 +26,7 @@
#
SUNW_1.23 {
- global:
+ protected:
aio_cancel64;
aio_error64;
aio_fsync64;
@@ -45,7 +45,7 @@ SUNW_1.23 {
};
SUNW_1.22.1 {
- global:
+ protected:
# Note: atomic_[and,dec,inc,or]_64_nv are also defined
# by the common mapfile. Here, we add the NODYNSORT attribute
# to them. On this platform, they are aliases for the non-_nv
@@ -58,15 +58,6 @@ SUNW_1.22.1 {
SUNW_1.22 {
global:
- alphasort64;
- _alphasort64;
-
- # Note: atomic_add_64_nv is also defined by the common mapfile.
- # Here, we add the NODYNSORT attribute to it. On this platform,
- # it is an aliases for atomic_add_64. If that is changed, this
- # line should be removed.
- atomic_add_64_nv = NODYNSORT;
-
dladdr = FUNCTION FILTER /usr/lib/ld.so.1;
dladdr1 = FUNCTION FILTER /usr/lib/ld.so.1;
dlclose = FUNCTION FILTER /usr/lib/ld.so.1;
@@ -76,13 +67,23 @@ SUNW_1.22 {
dlmopen = FUNCTION FILTER /usr/lib/ld.so.1;
dlopen = FUNCTION FILTER /usr/lib/ld.so.1;
dlsym = FUNCTION FILTER /usr/lib/ld.so.1;
+ protected:
+ alphasort64;
+ _alphasort64;
+
+ # Note: atomic_add_64_nv is also defined by the common mapfile.
+ # Here, we add the NODYNSORT attribute to it. On this platform,
+ # it is an aliases for atomic_add_64. If that is changed, this
+ # line should be removed.
+ atomic_add_64_nv = NODYNSORT;
+
pselect_large_fdset;
scandir64;
_scandir64;
};
SUNW_1.21 {
- global:
+ protected:
attropen64;
_attropen64;
fstatat64;
@@ -93,12 +94,12 @@ SUNW_1.21 {
};
SUNW_1.18 {
- global:
+ protected:
select_large_fdset;
};
SUNW_1.1 {
- global:
+ protected:
creat64;
_creat64;
fgetpos64;
@@ -161,22 +162,39 @@ SUNW_1.1 {
SUNW_0.7 {
global:
+ _bufendtab;
+ _ctype;
+ errno = NODIRECT;
+ _iob;
+ _lastbuf;
+ _sibuf;
+ _sobuf;
+ _sys_buslist;
+ _sys_cldlist;
+ sys_errlist;
+ _sys_fpelist;
+ sys_nerr;
+ _sys_nsig;
+ _sys_segvlist;
+ _sys_siginfolistp;
+ _sys_siglist;
+ _sys_siglistn;
+ _sys_siglistp;
+ _sys_traplist;
+ protected:
addseverity;
_addseverity;
asctime_r;
_assert;
- _bufendtab;
__builtin_alloca;
crypt;
_crypt;
ctime_r;
- _ctype;
__div64;
encrypt;
_encrypt;
endgrent;
endpwent;
- errno = NODIRECT;
___errno;
fgetgrent;
fgetgrent_r;
@@ -202,8 +220,6 @@ SUNW_0.7 {
gettimeofday;
_gettimeofday;
gmtime_r;
- _iob;
- _lastbuf;
localtime_r;
__mul64;
_mutex_held = NODYNSORT;
@@ -222,25 +238,11 @@ SUNW_0.7 {
setkey;
_setkey;
setpwent;
- _sibuf;
- _sobuf;
srand48;
strtok_r;
- _sys_buslist;
_syscall = NODYNSORT;
- _sys_cldlist;
- sys_errlist;
- _sys_fpelist;
sysinfo;
_sysinfo;
- sys_nerr;
- _sys_nsig;
- _sys_segvlist;
- _sys_siginfolistp;
- _sys_siglist;
- _sys_siglistn;
- _sys_siglistp;
- _sys_traplist;
ttyname_r;
__udiv64;
__urem64;
@@ -248,6 +250,43 @@ SUNW_0.7 {
SYSVABI_1.3 {
global:
+ _altzone;
+ calloc = NODIRECT;
+ __ctype;
+ daylight;
+ _daylight;
+ environ = NODIRECT;
+ _environ = NODIRECT;
+ free = NODIRECT;
+ frexp = FUNCTION FILTER libm.so.2;
+ getdate_err;
+ _getdate_err;
+ __huge_val;
+ __iob;
+ isnan = FUNCTION FILTER libm.so.2;
+ _isnan = FUNCTION FILTER libm.so.2;
+ isnand = FUNCTION FILTER libm.so.2;
+ _isnand = FUNCTION FILTER libm.so.2;
+ ldexp = FUNCTION FILTER libm.so.2;
+ logb = FUNCTION FILTER libm.so.2;
+ malloc = NODIRECT;
+ modf = FUNCTION FILTER libm.so.2;
+ _modf = FUNCTION FILTER libm.so.2;
+ nextafter = FUNCTION FILTER libm.so.2;
+ _nextafter = FUNCTION FILTER libm.so.2;
+ _numeric;
+ optarg;
+ opterr;
+ optind;
+ optopt;
+ realloc = NODIRECT;
+ scalb = FUNCTION FILTER libm.so.2;
+ _scalb = FUNCTION FILTER libm.so.2;
+ timezone;
+ _timezone;
+ tzname;
+ _tzname;
+ protected:
abort;
abs;
access;
@@ -256,7 +295,6 @@ SYSVABI_1.3 {
_acct;
alarm;
_alarm;
- _altzone;
asctime;
__assert;
atexit;
@@ -264,7 +302,6 @@ SYSVABI_1.3 {
atoi;
atol;
bsearch;
- calloc = NODIRECT;
catclose;
_catclose;
catgets;
@@ -291,7 +328,7 @@ SYSVABI_1.3 {
clearerr;
clock;
_close;
- close = NODIRECT;
+ close;
closedir;
_closedir;
creat;
@@ -299,19 +336,14 @@ SYSVABI_1.3 {
ctermid;
_ctermid;
ctime;
- __ctype;
cuserid;
_cuserid;
- daylight;
- _daylight;
difftime;
div;
dup;
_dup;
dup2;
_dup2;
- environ = NODIRECT;
- _environ = NODIRECT;
execl;
_execl;
execle;
@@ -356,7 +388,7 @@ SYSVABI_1.3 {
_fmtmsg;
fopen;
_fork;
- fork = NODIRECT;
+ fork;
fpathconf;
_fpathconf;
_fp_hw;
@@ -366,9 +398,7 @@ SYSVABI_1.3 {
fputc;
fputs;
fread;
- free = NODIRECT;
freopen;
- frexp = FUNCTION FILTER libm.so.2;
fscanf;
fseek;
fsetpos;
@@ -391,8 +421,6 @@ SYSVABI_1.3 {
_getcwd;
getdate;
_getdate;
- getdate_err;
- _getdate_err;
getegid;
_getegid;
getenv;
@@ -450,10 +478,8 @@ SYSVABI_1.3 {
_hdestroy;
hsearch;
_hsearch;
- __huge_val;
initgroups;
_initgroups;
- __iob;
ioctl;
_ioctl;
isalnum;
@@ -468,10 +494,6 @@ SYSVABI_1.3 {
isdigit;
isgraph;
islower;
- isnan = FUNCTION FILTER libm.so.2;
- _isnan = FUNCTION FILTER libm.so.2;
- isnand = FUNCTION FILTER libm.so.2;
- _isnand = FUNCTION FILTER libm.so.2;
isprint;
ispunct;
isspace;
@@ -482,7 +504,6 @@ SYSVABI_1.3 {
labs;
lchown;
_lchown;
- ldexp = FUNCTION FILTER libm.so.2;
ldiv;
lfind;
_lfind;
@@ -492,7 +513,6 @@ SYSVABI_1.3 {
localtime;
lockf;
_lockf;
- logb = FUNCTION FILTER libm.so.2;
longjmp;
lsearch;
_lsearch;
@@ -503,7 +523,6 @@ SYSVABI_1.3 {
_lxstat;
makecontext;
_makecontext;
- malloc = NODIRECT;
mblen;
mbstowcs;
mbtowc;
@@ -529,8 +548,6 @@ SYSVABI_1.3 {
_mlock;
mmap;
_mmap;
- modf = FUNCTION FILTER libm.so.2;
- _modf = FUNCTION FILTER libm.so.2;
monitor;
_monitor;
mount;
@@ -551,25 +568,18 @@ SYSVABI_1.3 {
_munlock;
munmap;
_munmap;
- nextafter = FUNCTION FILTER libm.so.2;
- _nextafter = FUNCTION FILTER libm.so.2;
nftw;
_nftw;
nice;
_nice;
nl_langinfo;
_nl_langinfo;
- _numeric;
nuname;
_nuname;
open;
_open;
opendir;
_opendir;
- optarg;
- opterr;
- optind;
- optopt;
pathconf;
_pathconf;
pause;
@@ -612,7 +622,6 @@ SYSVABI_1.3 {
_readlink;
readv;
_readv;
- realloc = NODIRECT;
remove;
rename;
_rename;
@@ -623,8 +632,6 @@ SYSVABI_1.3 {
_rmdir;
sbrk;
_sbrk;
- scalb = FUNCTION FILTER libm.so.2;
- _scalb = FUNCTION FILTER libm.so.2;
scanf;
seekdir;
_seekdir;
@@ -663,8 +670,8 @@ SYSVABI_1.3 {
_shmdt;
shmget;
_shmget;
- sigaction = NODIRECT;
- _sigaction = NODIRECT NODYNSORT;
+ sigaction;
+ _sigaction = NODYNSORT;
sigaddset;
_sigaddset;
sigaltstack;
@@ -779,8 +786,6 @@ SYSVABI_1.3 {
_time;
times;
_times;
- timezone;
- _timezone;
tmpfile;
tmpnam;
toascii;
@@ -795,8 +800,6 @@ SYSVABI_1.3 {
_ttyname;
twalk;
_twalk;
- tzname;
- _tzname;
tzset;
_tzset;
ulimit;
@@ -836,11 +839,6 @@ SYSVABI_1.3 {
SUNWprivate_1.1 {
global:
- _D_cplx_lr_div;
- _D_cplx_lr_div_ix;
- _D_cplx_lr_div_rx;
- __divdi3;
- __divrem64;
_dladdr = FUNCTION FILTER /usr/lib/ld.so.1;
_dladdr1 = FUNCTION FILTER /usr/lib/ld.so.1;
_dlclose = FUNCTION FILTER /usr/lib/ld.so.1;
@@ -850,6 +848,18 @@ SUNWprivate_1.1 {
_dlmopen = FUNCTION FILTER /usr/lib/ld.so.1;
_dlopen = FUNCTION FILTER /usr/lib/ld.so.1;
_dlsym = FUNCTION FILTER /usr/lib/ld.so.1;
+ _ld_libc = FUNCTION FILTER /usr/lib/ld.so.1;
+ _sys_errlist;
+ _sys_errs;
+ _sys_index;
+ _sys_nerr = NODYNSORT;
+ _sys_num_err;
+ protected:
+ _D_cplx_lr_div;
+ _D_cplx_lr_div_ix;
+ _D_cplx_lr_div_rx;
+ __divdi3;
+ __divrem64;
_F_cplx_lr_div;
_F_cplx_lr_div_ix;
_F_cplx_lr_div_rx;
@@ -860,12 +870,8 @@ SUNWprivate_1.1 {
__fseterror_u;
_fwprintf_c89;
_fwscanf_c89;
- gtty;
- _gtty;
- _hasmntopt;
_imaxabs_c89;
_imaxdiv_c89;
- _ld_libc = FUNCTION FILTER /usr/lib/ld.so.1;
_memcmp;
_memcpy;
_memmove;
@@ -881,13 +887,8 @@ SUNWprivate_1.1 {
_strtoumax_c89;
_swprintf_c89;
_swscanf_c89;
- _sys_errlist;
- _sys_errs;
sysi86;
_sysi86;
- _sys_index;
- _sys_nerr = NODYNSORT;
- _sys_num_err;
___tls_get_addr;
__udivdi3;
__udivrem64;
@@ -924,9 +925,6 @@ SUNWprivate_1.1 {
local:
__systemcall6 = NODYNSORT;
- _private_fstat64 = NODYNSORT;
- _private_stat64 = NODYNSORT;
- _private_sysi86 = NODYNSORT;
_seekdir64 = NODYNSORT;
_telldir64 = NODYNSORT;
};
diff --git a/usr/src/lib/libc/i386/sys/__getcontext.s b/usr/src/lib/libc/i386/sys/__getcontext.s
index c15db91c43..3ae3654cd0 100644
--- a/usr/src/lib/libc/i386/sys/__getcontext.s
+++ b/usr/src/lib/libc/i386/sys/__getcontext.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -36,8 +36,6 @@
#include "SYS.h"
- ANSI_PRAGMA_WEAK2(__getcontext_syscall,__getcontext,function)
-
ENTRY(__getcontext)
popl %edx
pushl $0
diff --git a/usr/src/lib/libc/i386/sys/_lwp_mutex_unlock.s b/usr/src/lib/libc/i386/sys/_lwp_mutex_unlock.s
index 543e194d82..1154c72140 100644
--- a/usr/src/lib/libc/i386/sys/_lwp_mutex_unlock.s
+++ b/usr/src/lib/libc/i386/sys/_lwp_mutex_unlock.s
@@ -20,7 +20,7 @@
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -35,8 +35,6 @@
#include "SYS.h"
#include <assym.h>
- ANSI_PRAGMA_WEAK2(_private_lwp_mutex_unlock,_lwp_mutex_unlock,function)
-
ENTRY(_lwp_mutex_unlock)
movl 4(%esp), %eax
addl $MUTEX_LOCK_WORD, %eax
diff --git a/usr/src/lib/libc/i386/sys/door.s b/usr/src/lib/libc/i386/sys/door.s
index e161d3e858..799d9e17fd 100644
--- a/usr/src/lib/libc/i386/sys/door.s
+++ b/usr/src/lib/libc/i386/sys/door.s
@@ -196,7 +196,7 @@ door_restart:
cmpl $EINTR, %eax /* interrupted while waiting? */
jne 4f /* if not, return the error */
_prologue_
- call _private_getpid /* get current process id */
+ call getpid
movl _daref_(door_create_pid), %edx
movl 0(%edx), %edx
_epilogue_
diff --git a/usr/src/lib/libc/i386/sys/getcontext.s b/usr/src/lib/libc/i386/sys/getcontext.s
index 992183af82..3979b3362a 100644
--- a/usr/src/lib/libc/i386/sys/getcontext.s
+++ b/usr/src/lib/libc/i386/sys/getcontext.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -49,7 +49,7 @@
#define GETCONTEXT_IMPL \
movl 4(%esp), %eax; /* %eax <-- first arg: ucp */ \
pushl %eax; /* push ucp for system call */ \
- call __getcontext_syscall; /* call getcontext: syscall */ \
+ call __getcontext; /* call getcontext: syscall */ \
addl $4, %esp; /* pop arg */ \
andl %eax, %eax; /* if (err_ret_from_syscall) */ \
je 1f; \
@@ -74,8 +74,6 @@
/*
* getcontext(ucontext_t *ucp)
*/
- ANSI_PRAGMA_WEAK2(_private_getcontext,getcontext,function)
-
ENTRY(getcontext)
GETCONTEXT_IMPL
ret
@@ -90,7 +88,7 @@
/ call setcontext
movl 8(%esp), %eax /* %eax <-- second arg: ucp */
pushl %eax /* push ucp for setcontext */
- call _private_setcontext /* call setcontext */
+ call setcontext
addl $4, %esp /* pop arg: just in case */
ret
SET_SIZE(swapcontext)
diff --git a/usr/src/lib/libc/i386/sys/ptrace.c b/usr/src/lib/libc/i386/sys/ptrace.c
index 6ad0682753..5cd033bdb0 100644
--- a/usr/src/lib/libc/i386/sys/ptrace.c
+++ b/usr/src/lib/libc/i386/sys/ptrace.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,13 +18,14 @@
*
* CDDL HEADER END
*/
+
/*
- * ptrace(2) interface built on top of proc(4).
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
*/
/*
- * Copyright 1992-2003 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
+ * ptrace(2) interface built on top of proc(4).
*/
#pragma ident "%Z%%M% %I% %E% SMI"
@@ -154,10 +154,10 @@ ptrace(int request, pid_t pid, int addr, int data)
#if PTRACE_DEBUG
fprintf(stderr, " ptrace(%s, 0x%X, 0x%X, 0x%X)\n",
- map(request), pid, addr, data);
+ map(request), pid, addr, data);
#endif
- (void) _private_mutex_lock(&pt_lock);
+ (void) mutex_lock(&pt_lock);
if (request == 0) { /* PTRACE_TRACEME, executed by traced process */
/*
@@ -205,7 +205,7 @@ ptrace(int request, pid_t pid, int addr, int data)
if (close(fd) != 0)
exit(255);
- (void) _private_mutex_unlock(&pt_lock);
+ (void) mutex_unlock(&pt_lock);
return (0);
}
@@ -237,7 +237,7 @@ again:
goto eio;
if (pread(cp->asfd, (char *)&data, sizeof (data), (off_t)addr)
== sizeof (data)) {
- (void) _private_mutex_unlock(&pt_lock);
+ (void) mutex_unlock(&pt_lock);
return (data);
}
goto eio;
@@ -255,7 +255,7 @@ again:
if ((int)xaddr >= 0 && xaddr < U_END) {
/* LINTED pointer alignment */
data = *((int *)((caddr_t)(&cp->user) + xaddr));
- (void) _private_mutex_unlock(&pt_lock);
+ (void) mutex_unlock(&pt_lock);
return (data);
}
goto eio;
@@ -266,7 +266,7 @@ again:
goto eio;
if (pwrite(cp->asfd, (char *)&data, sizeof (data), (off_t)addr)
== sizeof (data)) {
- (void) _private_mutex_unlock(&pt_lock);
+ (void) mutex_unlock(&pt_lock);
return (data);
}
goto eio;
@@ -284,14 +284,14 @@ again:
(data & PSL_USERMASK);
cp->user.u_reg[rx] = data;
cp->flags |= CS_SETREGS;
- (void) _private_mutex_unlock(&pt_lock);
+ (void) mutex_unlock(&pt_lock);
return (data);
}
goto eio;
case 7: /* PTRACE_CONT */
case 9: /* PTRACE_SINGLESTEP */
- {
+ {
long runctl[3];
if (cp->flags & CS_SETREGS) {
@@ -355,16 +355,16 @@ again:
if (errno == ENOENT) {
/* current signal must have killed it */
ReleaseProc(cp);
- (void) _private_mutex_unlock(&pt_lock);
+ (void) mutex_unlock(&pt_lock);
return (data);
}
goto tryagain;
}
(void) memset((char *)ps, 0, sizeof (pstatus_t));
cp->flags = 0;
- (void) _private_mutex_unlock(&pt_lock);
+ (void) mutex_unlock(&pt_lock);
return (data);
- }
+ }
case 8: /* PTRACE_KILL */
/* overkill? */
@@ -375,7 +375,7 @@ again:
sizeof (long)+sizeof (siginfo_t));
(void) kill(pid, SIGKILL);
ReleaseProc(cp);
- (void) _private_mutex_unlock(&pt_lock);
+ (void) mutex_unlock(&pt_lock);
return (0);
default:
@@ -390,11 +390,11 @@ tryagain:
}
eio:
errno = EIO;
- (void) _private_mutex_unlock(&pt_lock);
+ (void) mutex_unlock(&pt_lock);
return (-1);
esrch:
errno = ESRCH;
- (void) _private_mutex_unlock(&pt_lock);
+ (void) mutex_unlock(&pt_lock);
return (-1);
}
diff --git a/usr/src/lib/libc/i386/sys/sysi86.s b/usr/src/lib/libc/i386/sys/sysi86.s
index ba82c1b0a3..14e47db53c 100644
--- a/usr/src/lib/libc/i386/sys/sysi86.s
+++ b/usr/src/lib/libc/i386/sys/sysi86.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -34,8 +34,6 @@
#include "SYS.h"
- ANSI_PRAGMA_WEAK2(_private_sysi86,_sysi86,function)
-
ENTRY(_sysi86)
SYSTRAP_RVAL1(sysi86)
SYSCERROR
diff --git a/usr/src/lib/libc/i386/threads/asm_subr.s b/usr/src/lib/libc/i386/threads/asm_subr.s
index d037770d2b..232cb09893 100644
--- a/usr/src/lib/libc/i386/threads/asm_subr.s
+++ b/usr/src/lib/libc/i386/threads/asm_subr.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -85,11 +85,6 @@
RET
SET_SIZE(__lwp_unpark_all)
- ENTRY(lwp_yield)
- SYSTRAP_RVAL1(yield)
- RETC
- SET_SIZE(lwp_yield)
-
/*
* __sighndlr(int sig, siginfo_t *si, ucontext_t *uc, void (*hndlr)())
*
diff --git a/usr/src/lib/libc/i386/threads/machdep.c b/usr/src/lib/libc/i386/threads/machdep.c
index e28e2cd480..c5b8e2d118 100644
--- a/usr/src/lib/libc/i386/threads/machdep.c
+++ b/usr/src/lib/libc/i386/threads/machdep.c
@@ -48,7 +48,7 @@ setup_context(ucontext_t *ucp, void *(*func)(ulwp_t *),
/* do this once to load the segment registers */
uc.uc_flags = UC_CPU;
- (void) __getcontext_syscall(&uc);
+ (void) __getcontext(&uc);
fs = uc.uc_mcontext.gregs[FS];
es = uc.uc_mcontext.gregs[ES];
ds = uc.uc_mcontext.gregs[DS];
@@ -57,7 +57,7 @@ setup_context(ucontext_t *ucp, void *(*func)(ulwp_t *),
initialized = 1;
}
/* clear the context and set the segment registers */
- (void) _memset(ucp, 0, sizeof (*ucp));
+ (void) memset(ucp, 0, sizeof (*ucp));
ucp->uc_mcontext.gregs[FS] = fs;
ucp->uc_mcontext.gregs[ES] = es;
ucp->uc_mcontext.gregs[DS] = ds;
@@ -103,7 +103,7 @@ _thr_setup(ulwp_t *self)
self->ul_ustack.ss_sp = (void *)(self->ul_stktop - self->ul_stksiz);
self->ul_ustack.ss_size = self->ul_stksiz;
self->ul_ustack.ss_flags = 0;
- (void) _private_setustack(&self->ul_ustack);
+ (void) setustack(&self->ul_ustack);
update_sched(self);
tls_setup();
diff --git a/usr/src/lib/libc/i386_hwcap1/gen/memcpy.s b/usr/src/lib/libc/i386_hwcap1/gen/memcpy.s
index 51e494a3ea..745a1ce5d7 100644
--- a/usr/src/lib/libc/i386_hwcap1/gen/memcpy.s
+++ b/usr/src/lib/libc/i386_hwcap1/gen/memcpy.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -35,8 +35,6 @@
#include "SYS.h"
- ANSI_PRAGMA_WEAK2(_private_memcpy,memcpy,function)
-
ENTRY(memmove)
movl 0+12(%esp),%ecx / get number of bytes to move
pushl %esi / save off %edi, %esi and move destination
diff --git a/usr/src/lib/libc/i386_hwcap1/gen/memset.s b/usr/src/lib/libc/i386_hwcap1/gen/memset.s
index 681b61028f..740173118e 100644
--- a/usr/src/lib/libc/i386_hwcap1/gen/memset.s
+++ b/usr/src/lib/libc/i386_hwcap1/gen/memset.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -34,8 +34,6 @@
#include "SYS.h"
- ANSI_PRAGMA_WEAK2(_private_memset,memset,function)
-
ENTRY(memset)
pushl %edi / save register variable
movl 8(%esp),%edi / %edi = string address
diff --git a/usr/src/lib/libc/inc/libc.h b/usr/src/lib/libc/inc/libc.h
index 22c399017f..1136e09665 100644
--- a/usr/src/lib/libc/inc/libc.h
+++ b/usr/src/lib/libc/inc/libc.h
@@ -87,7 +87,6 @@ extern int _thr_keycreate_once(thread_key_t *pkey, void (*destructor)(void *));
extern void *_pthread_getspecific(thread_key_t);
extern int _pollsys(struct pollfd *, nfds_t, const timespec_t *,
const sigset_t *);
-extern void _private_testcancel(void);
/*
* The private_DIR structure is the same as the DIR structure,
@@ -219,12 +218,8 @@ extern int lsign(dl_t);
/*
* defined in ucontext.s
- * __getcontext() is exported by libc
- * __getcontext_syscall() is private to libc
- * otherwise they are the same function
*/
extern int __getcontext(ucontext_t *);
-extern int __getcontext_syscall(ucontext_t *);
/*
* defined in door.s
diff --git a/usr/src/lib/libc/inc/libc_int.h b/usr/src/lib/libc/inc/libc_int.h
index c427a56152..3cb5be036d 100644
--- a/usr/src/lib/libc/inc/libc_int.h
+++ b/usr/src/lib/libc/inc/libc_int.h
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 1999-2003 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -55,8 +55,18 @@ extern "C" {
#define CI_V_TWO 2
#define CI_V_THREE 3
#define CI_V_FOUR 4
-#define CI_V_CURRENT CI_V_FOUR /* current version of libc interface */
-#define CI_V_NUM 5 /* number of CI_V_* numbers */
+#define CI_V_FIVE 5
+#define CI_V_CURRENT CI_V_FIVE /* current version of libc interface */
+#define CI_V_NUM 6 /* number of CI_V_* numbers */
+
+/*
+ * Flags for the bindguard routines.
+ * THR_FLG_RTLD used to live in usr/src/cmd/sgs/rtld/common/_rtld.h
+ * THR_FLG_NOLOCK and THR_FLG_REENTER are new in version CI_V_FIVE.
+ */
+#define THR_FLG_RTLD 0x00000001 /* bind_guard() flag */
+#define THR_FLG_NOLOCK 0x00000002 /* don't use ld.so.1's lock */
+#define THR_FLG_REENTER 0x00000004 /* temporary leave / reenter */
/*
* Libc to ld.so.1 interface communication structure.
diff --git a/usr/src/lib/libc/inc/mtlib.h b/usr/src/lib/libc/inc/mtlib.h
index c6dbdb1f3a..af4264c775 100644
--- a/usr/src/lib/libc/inc/mtlib.h
+++ b/usr/src/lib/libc/inc/mtlib.h
@@ -37,11 +37,6 @@ extern "C" {
/* these are private to the library */
extern int primary_link_map;
-extern int _private_mutex_init(mutex_t *, int, void *);
-extern int _private_mutex_destroy(mutex_t *);
-extern int _private_mutex_lock(mutex_t *);
-extern int _private_mutex_trylock(mutex_t *);
-extern int _private_mutex_unlock(mutex_t *);
extern void lmutex_lock(mutex_t *);
extern void lmutex_unlock(mutex_t *);
extern int __rwlock_init(rwlock_t *, int, void *);
diff --git a/usr/src/lib/libc/inc/thr_uberdata.h b/usr/src/lib/libc/inc/thr_uberdata.h
index 4456b3d3df..e9c25465e8 100644
--- a/usr/src/lib/libc/inc/thr_uberdata.h
+++ b/usr/src/lib/libc/inc/thr_uberdata.h
@@ -846,8 +846,9 @@ typedef struct {
*/
typedef struct uberdata {
pad_lock_t _link_lock;
- pad32_lock_t _fork_lock;
- pad32_lock_t _atfork_lock;
+ pad_lock_t _ld_lock;
+ pad_lock_t _fork_lock;
+ pad_lock_t _atfork_lock;
pad32_lock_t _callout_lock;
pad32_lock_t _tdb_hash_lock;
tdb_sync_stats_t tdb_hash_lock_stats;
@@ -891,6 +892,7 @@ typedef struct uberdata {
} uberdata_t;
#define link_lock _link_lock.pad_lock
+#define ld_lock _ld_lock.pad_lock
#define fork_lock _fork_lock.pad_lock
#define atfork_lock _atfork_lock.pad_lock
#define callout_lock _callout_lock.pad_lock
@@ -1054,8 +1056,9 @@ typedef struct ulwp32 {
typedef struct uberdata32 {
pad_lock_t _link_lock;
- pad32_lock_t _fork_lock;
- pad32_lock_t _atfork_lock;
+ pad_lock_t _ld_lock;
+ pad_lock_t _fork_lock;
+ pad_lock_t _atfork_lock;
pad32_lock_t _callout_lock;
pad32_lock_t _tdb_hash_lock;
tdb_sync_stats_t tdb_hash_lock_stats;
@@ -1328,50 +1331,27 @@ extern void no_preempt(ulwp_t *);
extern void preempt(ulwp_t *);
extern void _thrp_unwind(void *);
-/*
- * Prototypes for the strong versions of the interface functions
- */
extern pid_t __forkx(int);
extern pid_t __forkallx(int);
-extern pid_t _private_getpid(void);
-extern uid_t _private_geteuid(void);
extern int _kill(pid_t, int);
-extern int _private_open(const char *, int, ...);
-extern int _private_close(int);
+extern int __open(const char *, int, ...);
+extern int __close(int);
extern ssize_t __read(int, void *, size_t);
extern ssize_t __write(int, const void *, size_t);
-extern void *_memcpy(void *, const void *, size_t);
-extern void *_memset(void *, int, size_t);
-extern int _memcmp(const void *, const void *, size_t);
-extern void *_private_memcpy(void *, const void *, size_t);
-extern void *_private_memset(void *, int, size_t);
-extern int _private_sigfillset(sigset_t *);
-extern int _private_sigemptyset(sigset_t *);
-extern int _private_sigaddset(sigset_t *, int);
-extern int _private_sigdelset(sigset_t *, int);
-extern int _private_sigismember(sigset_t *, int);
-extern void *_private_mmap(void *, size_t, int, int, int, off_t);
-extern int _private_mprotect(void *, size_t, int);
-extern int _private_munmap(void *, size_t);
-extern int _private_getrlimit(int, struct rlimit *);
+extern int __fcntl(int, int, ...);
extern int __lwp_continue(lwpid_t);
extern int __lwp_create(ucontext_t *, uint_t, lwpid_t *);
extern int __lwp_kill(lwpid_t, int);
extern lwpid_t __lwp_self(void);
extern int ___lwp_suspend(lwpid_t);
-extern void lwp_yield(void);
extern int lwp_wait(lwpid_t, lwpid_t *);
extern int __lwp_wait(lwpid_t, lwpid_t *);
extern int __lwp_detach(lwpid_t);
extern sc_shared_t *__schedctl(void);
-extern int _private_setcontext(const ucontext_t *);
-extern int _private_getcontext(ucontext_t *);
-#pragma unknown_control_flow(_private_getcontext)
/* actual system call traps */
-extern int __setcontext_syscall(const ucontext_t *);
-extern int __getcontext_syscall(ucontext_t *);
-extern int _private_setustack(stack_t *);
+extern int __setcontext(const ucontext_t *);
+extern int __getcontext(ucontext_t *);
extern int __clock_gettime(clockid_t, timespec_t *);
extern void abstime_to_reltime(clockid_t, const timespec_t *, timespec_t *);
extern void hrt2ts(hrtime_t, timespec_t *);
@@ -1387,7 +1367,6 @@ extern int _pthread_setspecific(pthread_key_t, const void *);
extern void *_pthread_getspecific(pthread_key_t);
extern void _pthread_exit(void *);
extern int _pthread_setcancelstate(int, int *);
-extern void _private_testcancel(void);
/* belongs in <pthread.h> */
#define PTHREAD_CREATE_DAEMON_NP 0x100 /* = THR_DAEMON */
@@ -1395,13 +1374,6 @@ extern void _private_testcancel(void);
extern int _pthread_attr_setdaemonstate_np(pthread_attr_t *, int);
extern int _pthread_attr_getdaemonstate_np(const pthread_attr_t *, int *);
-/* these are private to the library */
-extern int _private_mutex_init(mutex_t *, int, void *);
-extern int _private_mutex_destroy(mutex_t *);
-extern int _private_mutex_lock(mutex_t *);
-extern int _private_mutex_trylock(mutex_t *);
-extern int _private_mutex_unlock(mutex_t *);
-
extern int _mutex_init(mutex_t *, int, void *);
extern int _mutex_destroy(mutex_t *);
extern int _mutex_consistent(mutex_t *);
@@ -1475,7 +1447,6 @@ extern const thrattr_t *def_thrattr(void);
extern id_t setparam(idtype_t, id_t, int, int);
extern id_t setprio(idtype_t, id_t, int, int *);
extern id_t getparam(idtype_t, id_t, int *, struct sched_param *);
-extern long _private_priocntl(idtype_t, id_t, int, void *);
/*
* System call wrappers (direct interfaces to the kernel)
@@ -1503,9 +1474,6 @@ extern int __lwp_unpark_all(lwpid_t *, int);
extern int ___lwp_private(int, int, void *);
#endif /* __x86 */
-extern int _private_lwp_mutex_lock(mutex_t *);
-extern int _private_lwp_mutex_unlock(mutex_t *);
-
/*
* inlines
*/
diff --git a/usr/src/lib/libc/port/gen/atexit.c b/usr/src/lib/libc/port/gen/atexit.c
index d687f8d48c..560e5852e7 100644
--- a/usr/src/lib/libc/port/gen/atexit.c
+++ b/usr/src/lib/libc/port/gen/atexit.c
@@ -81,13 +81,13 @@ extern caddr_t _getfp(void);
void
atexit_locks()
{
- (void) _private_mutex_lock(&__uberdata.atexit_root.exitfns_lock);
+ (void) mutex_lock(&__uberdata.atexit_root.exitfns_lock);
}
void
atexit_unlocks()
{
- (void) _private_mutex_unlock(&__uberdata.atexit_root.exitfns_lock);
+ (void) mutex_unlock(&__uberdata.atexit_root.exitfns_lock);
}
/*
@@ -108,13 +108,13 @@ _atexit(void (*func)(void))
arp = &__uberdata.atexit_root;
else {
arp = &self->ul_uberdata->atexit_root;
- (void) _private_mutex_lock(&arp->exitfns_lock);
+ (void) mutex_lock(&arp->exitfns_lock);
}
p->hdlr = func;
p->next = arp->head;
arp->head = p;
if (self != NULL)
- (void) _private_mutex_unlock(&arp->exitfns_lock);
+ (void) mutex_unlock(&arp->exitfns_lock);
return (0);
}
@@ -124,7 +124,7 @@ _exithandle(void)
atexit_root_t *arp = &curthread->ul_uberdata->atexit_root;
_exthdlr_t *p;
- (void) _private_mutex_lock(&arp->exitfns_lock);
+ (void) mutex_lock(&arp->exitfns_lock);
arp->exit_frame_monitor = _getfp() + STACK_BIAS;
p = arp->head;
while (p != NULL) {
@@ -133,7 +133,7 @@ _exithandle(void)
lfree(p, sizeof (_exthdlr_t));
p = arp->head;
}
- (void) _private_mutex_unlock(&arp->exitfns_lock);
+ (void) mutex_unlock(&arp->exitfns_lock);
}
/*
@@ -203,7 +203,7 @@ _preexec_atfork_unload(Lc_addr_range_t range[], uint_t count)
void (*func)(void);
int start_again;
- (void) _private_mutex_lock(&udp->atfork_lock);
+ (void) mutex_lock(&udp->atfork_lock);
if ((atfork_q = udp->atforklist) != NULL) {
atfp = atfork_q;
do {
@@ -244,7 +244,7 @@ _preexec_atfork_unload(Lc_addr_range_t range[], uint_t count)
}
} while ((atfp = next) != atfork_q || start_again);
}
- (void) _private_mutex_unlock(&udp->atfork_lock);
+ (void) mutex_unlock(&udp->atfork_lock);
}
/*
@@ -287,7 +287,7 @@ _preexec_exit_handlers(Lc_addr_range_t range[], uint_t count)
_exthdlr_t *o; /* previous node */
_exthdlr_t *p; /* this node */
- (void) _private_mutex_lock(&arp->exitfns_lock);
+ (void) mutex_lock(&arp->exitfns_lock);
o = NULL;
p = arp->head;
while (p != NULL) {
@@ -306,7 +306,7 @@ _preexec_exit_handlers(Lc_addr_range_t range[], uint_t count)
p = p->next;
}
}
- (void) _private_mutex_unlock(&arp->exitfns_lock);
+ (void) mutex_unlock(&arp->exitfns_lock);
_preexec_tsd_unload(range, count);
_preexec_atfork_unload(range, count);
diff --git a/usr/src/lib/libc/port/gen/atfork.c b/usr/src/lib/libc/port/gen/atfork.c
index 4db5bd0912..62ed20dce3 100644
--- a/usr/src/lib/libc/port/gen/atfork.c
+++ b/usr/src/lib/libc/port/gen/atfork.c
@@ -20,7 +20,7 @@
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -45,7 +45,6 @@
* handlers installed by a library are deleted when that library
* is unloaded (see _preexec_atfork_unload() in atexit.c).
*/
-#pragma weak _private_pthread_atfork = _pthread_atfork
#pragma weak pthread_atfork = _pthread_atfork
int
_pthread_atfork(void (*prepare)(void),
@@ -57,7 +56,7 @@ _pthread_atfork(void (*prepare)(void),
atfork_t *head;
int error = 0;
- (void) _private_mutex_lock(&udp->atfork_lock);
+ (void) mutex_lock(&udp->atfork_lock);
if (self->ul_fork) {
/*
* Cannot call pthread_atfork() from a fork handler.
@@ -80,7 +79,7 @@ _pthread_atfork(void (*prepare)(void),
}
}
- (void) _private_mutex_unlock(&udp->atfork_lock);
+ (void) mutex_unlock(&udp->atfork_lock);
return (error);
}
diff --git a/usr/src/lib/libc/port/gen/attrat.c b/usr/src/lib/libc/port/gen/attrat.c
index 9a272433c5..547faa5e84 100644
--- a/usr/src/lib/libc/port/gen/attrat.c
+++ b/usr/src/lib/libc/port/gen/attrat.c
@@ -39,6 +39,7 @@
#include <unistd.h>
#include <dlfcn.h>
#include <stdio.h>
+#include <atomic.h>
static int (*nvpacker)(nvlist_t *, char **, size_t *, int, int);
static int (*nvsize)(nvlist_t *, size_t *, int);
@@ -58,37 +59,46 @@ static char *xattr_view_name[XATTR_VIEW_LAST] = {
static int
attrat_init()
{
+ void *packer;
+ void *sizer;
+ void *unpacker;
+ void *freer;
+ void *looker;
+
if (initialized == 0) {
- void *libnvhandle = dlopen("libnvpair.so.1", RTLD_LAZY);
+ void *handle = dlopen("libnvpair.so.1", RTLD_LAZY);
+
+ if (handle == NULL ||
+ (packer = dlsym(handle, "nvlist_pack")) == NULL ||
+ (sizer = dlsym(handle, "nvlist_size")) == NULL ||
+ (unpacker = dlsym(handle, "nvlist_unpack")) == NULL ||
+ (freer = dlsym(handle, "nvlist_free")) == NULL ||
+ (looker = dlsym(handle, "nvlist_lookup_uint64")) == NULL) {
+ if (handle)
+ dlclose(handle);
+ return (-1);
+ }
lmutex_lock(&attrlock);
- if (initialized == 1) {
- lmutex_unlock(&attrlock);
- if (libnvhandle)
- dlclose(libnvhandle);
- return (0);
- }
- if (libnvhandle == NULL || (nvpacker = (int (*)(nvlist_t *,
- char **, size_t *, int, int)) dlsym(libnvhandle,
- "nvlist_pack")) == NULL ||
- (nvsize = (int (*)(nvlist_t *,
- size_t *, int)) dlsym(libnvhandle,
- "nvlist_size")) == NULL ||
- (nvfree = (int (*)(nvlist_t *)) dlsym(libnvhandle,
- "nvlist_free")) == NULL ||
- (nvlookupint64 = (int (*)(nvlist_t *, const char *,
- uint64_t *)) dlsym(libnvhandle,
- "nvlist_lookup_uint64")) == NULL ||
- (nvunpacker = (int (*)(char *, size_t,
- nvlist_t **)) dlsym(libnvhandle,
- "nvlist_unpack")) == NULL) {
- if (libnvhandle)
- dlclose(libnvhandle);
+ if (initialized != 0) {
lmutex_unlock(&attrlock);
- return (-1);
+ dlclose(handle);
+ return (0);
}
+ nvpacker = (int (*)(nvlist_t *, char **, size_t *, int, int))
+ packer;
+ nvsize = (int (*)(nvlist_t *, size_t *, int))
+ sizer;
+ nvunpacker = (int (*)(char *, size_t, nvlist_t **))
+ unpacker;
+ nvfree = (int (*)(nvlist_t *))
+ freer;
+ nvlookupint64 = (int (*)(nvlist_t *, const char *, uint64_t *))
+ looker;
+
+ membar_producer();
initialized = 1;
lmutex_unlock(&attrlock);
}
diff --git a/usr/src/lib/libc/port/gen/errno.c b/usr/src/lib/libc/port/gen/errno.c
index 4f1b6a9c20..a4f1e396f1 100644
--- a/usr/src/lib/libc/port/gen/errno.c
+++ b/usr/src/lib/libc/port/gen/errno.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,21 +18,20 @@
*
* CDDL HEADER END
*/
-/* Copyright (c) 1988 AT&T */
-/* All Rights Reserved */
-
/*
- * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/* Copyright (c) 1988 AT&T */
+/* All Rights Reserved */
+
#pragma ident "%Z%%M% %I% %E% SMI"
#include "lint.h"
#include "thr_uberdata.h"
-#pragma weak _private___errno = ___errno
int *
___errno()
{
diff --git a/usr/src/lib/libc/port/gen/malloc.c b/usr/src/lib/libc/port/gen/malloc.c
index c86d76cc54..14592dd468 100644
--- a/usr/src/lib/libc/port/gen/malloc.c
+++ b/usr/src/lib/libc/port/gen/malloc.c
@@ -20,7 +20,7 @@
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -103,13 +103,13 @@ static int freeidx; /* index of free blocks in flist % FREESIZE */
void
malloc_locks(void)
{
- (void) _private_mutex_lock(&libc_malloc_lock);
+ (void) mutex_lock(&libc_malloc_lock);
}
void
malloc_unlocks(void)
{
- (void) _private_mutex_unlock(&libc_malloc_lock);
+ (void) mutex_unlock(&libc_malloc_lock);
}
/*
@@ -169,9 +169,9 @@ malloc(size_t size)
return (NULL);
}
assert_no_libc_locks_held();
- (void) _private_mutex_lock(&libc_malloc_lock);
+ (void) mutex_lock(&libc_malloc_lock);
ret = _malloc_unlocked(size);
- (void) _private_mutex_unlock(&libc_malloc_lock);
+ (void) mutex_unlock(&libc_malloc_lock);
return (ret);
}
@@ -204,7 +204,7 @@ _malloc_unlocked(size_t size)
* exact match, use it as is
*/
freeidx = (freeidx + FREESIZE - 1) &
- FREEMASK; /* 1 back */
+ FREEMASK; /* 1 back */
flist[freeidx] = Lfree = NULL;
return (DATA(sp));
} else if (size >= MINSIZE && n > size) {
@@ -212,7 +212,7 @@ _malloc_unlocked(size_t size)
* got a big enough piece
*/
freeidx = (freeidx + FREESIZE - 1) &
- FREEMASK; /* 1 back */
+ FREEMASK; /* 1 back */
flist[freeidx] = Lfree = NULL;
o_bit1 = SIZE(sp) & BIT1;
SIZE(sp) = n;
@@ -320,10 +320,10 @@ realloc(void *old, size_t size)
}
/* pointer to the block */
- (void) _private_mutex_lock(&libc_malloc_lock);
+ (void) mutex_lock(&libc_malloc_lock);
if (old == NULL) {
new = _malloc_unlocked(size);
- (void) _private_mutex_unlock(&libc_malloc_lock);
+ (void) mutex_unlock(&libc_malloc_lock);
return (new);
}
@@ -338,7 +338,7 @@ realloc(void *old, size_t size)
/* if the block was freed, data has been destroyed. */
if (!ISBIT0(ts)) {
- (void) _private_mutex_unlock(&libc_malloc_lock);
+ (void) mutex_unlock(&libc_malloc_lock);
return (NULL);
}
@@ -346,7 +346,7 @@ realloc(void *old, size_t size)
CLRBITS01(SIZE(tp));
if (size == SIZE(tp)) {
SIZE(tp) = ts;
- (void) _private_mutex_unlock(&libc_malloc_lock);
+ (void) mutex_unlock(&libc_malloc_lock);
return (old);
}
@@ -356,7 +356,7 @@ realloc(void *old, size_t size)
if (size == 0) {
SETOLD01(SIZE(tp), ts);
_free_unlocked(old);
- (void) _private_mutex_unlock(&libc_malloc_lock);
+ (void) mutex_unlock(&libc_malloc_lock);
return (NULL);
} else {
goto call_malloc;
@@ -405,7 +405,7 @@ chop_big:
/* the previous block may be free */
SETOLD01(SIZE(tp), ts);
- (void) _private_mutex_unlock(&libc_malloc_lock);
+ (void) mutex_unlock(&libc_malloc_lock);
return (old);
}
@@ -418,7 +418,7 @@ call_malloc:
ts = size;
MEMCOPY(new, old, ts);
_free_unlocked(old);
- (void) _private_mutex_unlock(&libc_malloc_lock);
+ (void) mutex_unlock(&libc_malloc_lock);
return (new);
}
@@ -443,7 +443,7 @@ call_malloc:
if (SIZE(tp) < MINSIZE) {
if (size < SIZE(tp)) { /* case 1. */
SETOLD01(SIZE(tp), ts);
- (void) _private_mutex_unlock(&libc_malloc_lock);
+ (void) mutex_unlock(&libc_malloc_lock);
return (old);
} else if (size < MINSIZE) { /* case 2. */
size = MINSIZE;
@@ -468,7 +468,7 @@ call_malloc:
goto chop_big;
}
SETOLD01(SIZE(tp), ts);
- (void) _private_mutex_unlock(&libc_malloc_lock);
+ (void) mutex_unlock(&libc_malloc_lock);
return (NULL);
}
@@ -853,10 +853,14 @@ t_splay(TREE *tp)
void
free(void *old)
{
+ if (!primary_link_map) {
+ errno = ENOTSUP;
+ return;
+ }
assert_no_libc_locks_held();
- (void) _private_mutex_lock(&libc_malloc_lock);
+ (void) mutex_lock(&libc_malloc_lock);
_free_unlocked(old);
- (void) _private_mutex_unlock(&libc_malloc_lock);
+ (void) mutex_unlock(&libc_malloc_lock);
}
@@ -865,7 +869,7 @@ _free_unlocked(void *old)
{
int i;
- if (old == NULL || !primary_link_map)
+ if (old == NULL)
return;
/*
diff --git a/usr/src/lib/libc/port/gen/memalign.c b/usr/src/lib/libc/port/gen/memalign.c
index 482c5e378e..91519da222 100644
--- a/usr/src/lib/libc/port/gen/memalign.c
+++ b/usr/src/lib/libc/port/gen/memalign.c
@@ -20,7 +20,7 @@
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -70,6 +70,11 @@ memalign(size_t align, size_t nbytes)
size_t frag_size; /* size of fragments fore and aft */
size_t x;
+ if (!primary_link_map) {
+ errno = ENOTSUP;
+ return (NULL);
+ }
+
/*
* check for valid size and alignment parameters
* MAX_ALIGN check prevents overflow in later calculation.
@@ -114,7 +119,7 @@ memalign(size_t align, size_t nbytes)
/* malloc sets errno */
return (NULL);
}
- (void) _private_mutex_lock(&libc_malloc_lock);
+ (void) mutex_lock(&libc_malloc_lock);
/*
* get size of the entire block (overhead and all)
@@ -175,6 +180,6 @@ memalign(size_t align, size_t nbytes)
SIZE(blk) = frag_size | BIT0;
_free_unlocked(DATA(blk));
}
- (void) _private_mutex_unlock(&libc_malloc_lock);
+ (void) mutex_unlock(&libc_malloc_lock);
return (DATA(aligned_blk));
}
diff --git a/usr/src/lib/libc/port/gen/nss_common.c b/usr/src/lib/libc/port/gen/nss_common.c
index 056752743c..6f24fac496 100644
--- a/usr/src/lib/libc/port/gen/nss_common.c
+++ b/usr/src/lib/libc/port/gen/nss_common.c
@@ -890,7 +890,7 @@ _nss_db_state_constr(nss_db_initf_t initf)
if ((s = libc_malloc(sizeof (*s))) == 0) {
return (0);
}
- (void) _private_mutex_init(&s->orphan_root.lock, USYNC_THREAD, 0);
+ (void) mutex_init(&s->orphan_root.lock, USYNC_THREAD, 0);
s->p.max_active_per_src = 10;
s->p.max_dormant_per_src = 1;
@@ -985,7 +985,7 @@ _nss_db_state_destr(struct nss_db_state *s)
if (s == NULL)
return;
- /* === _private_mutex_destroy(&s->orphan_root.lock); */
+ /* === mutex_destroy(&s->orphan_root.lock); */
if (s->p.cleanup != 0) {
(*s->p.cleanup)(&s->p);
}
diff --git a/usr/src/lib/libc/port/gen/nss_dbdefs.c b/usr/src/lib/libc/port/gen/nss_dbdefs.c
index e9bff2460c..b77b507fe0 100644
--- a/usr/src/lib/libc/port/gen/nss_dbdefs.c
+++ b/usr/src/lib/libc/port/gen/nss_dbdefs.c
@@ -1080,42 +1080,32 @@ nss_pinit_funcs(int index, nss_db_initf_t *initf, nss_str2ent_t *s2e)
membar_consumer();
if (initf) {
- if (getXbyY_to_dbop[index].initfnp != NULL) {
- membar_consumer();
- *initf = (nss_db_initf_t)getXbyY_to_dbop[index].initfnp;
- } else {
+ if (getXbyY_to_dbop[index].initfnp == NULL) {
+ name = getXbyY_to_dbop[index].initfn;
+ if ((sym = dlsym(handle, name)) == NULL)
+ return (NSS_ERROR);
lmutex_lock(&initf_lock);
- if (getXbyY_to_dbop[index].initfnp == NULL) {
- name = getXbyY_to_dbop[index].initfn;
- if ((sym = dlsym(handle, name)) == 0) {
- lmutex_unlock(&initf_lock);
- return (NSS_ERROR);
- }
+ if (getXbyY_to_dbop[index].initfnp == NULL)
getXbyY_to_dbop[index].initfnp = sym;
- }
membar_producer();
- *initf = (nss_db_initf_t)getXbyY_to_dbop[index].initfnp;
lmutex_unlock(&initf_lock);
}
+ membar_consumer();
+ *initf = (nss_db_initf_t)getXbyY_to_dbop[index].initfnp;
}
if (s2e) {
- if (getXbyY_to_dbop[index].strfnp != NULL) {
- membar_consumer();
- *s2e = (nss_str2ent_t)getXbyY_to_dbop[index].strfnp;
- } else {
+ if (getXbyY_to_dbop[index].strfnp == NULL) {
+ name = getXbyY_to_dbop[index].strfn;
+ if ((sym = dlsym(handle, name)) == NULL)
+ return (NSS_ERROR);
lmutex_lock(&s2e_lock);
- if (getXbyY_to_dbop[index].strfnp == NULL) {
- name = getXbyY_to_dbop[index].strfn;
- if ((sym = dlsym(handle, name)) == 0) {
- lmutex_unlock(&s2e_lock);
- return (NSS_ERROR);
- }
+ if (getXbyY_to_dbop[index].strfnp == NULL)
getXbyY_to_dbop[index].strfnp = sym;
- }
membar_producer();
- *s2e = (nss_str2ent_t)getXbyY_to_dbop[index].strfnp;
lmutex_unlock(&s2e_lock);
}
+ membar_consumer();
+ *s2e = (nss_str2ent_t)getXbyY_to_dbop[index].strfnp;
}
return (NSS_SUCCESS);
diff --git a/usr/src/lib/libc/port/gen/priocntl.c b/usr/src/lib/libc/port/gen/priocntl.c
index 71aae38c63..2f76e857f1 100644
--- a/usr/src/lib/libc/port/gen/priocntl.c
+++ b/usr/src/lib/libc/port/gen/priocntl.c
@@ -61,23 +61,6 @@ __priocntl(int pc_version, idtype_t idtype, id_t id, int cmd, caddr_t arg)
return (__priocntlset(pc_version, &procset, cmd, arg, 0));
}
-/*
- * Internally to libc, we call this function rather than priocntl()
- * when the cmd is not PC_GETXPARMS or PC_SETXPARMS. We do this
- * for the sake of calling common code in various places. One of
- * these places is in spawn() and spawnp(), where we must not call
- * any function that is exported from libc while in the child of vfork().
- */
-long
-_private_priocntl(idtype_t idtype, id_t id, int cmd, void *arg)
-{
- extern long _private__priocntlset(int, procset_t *, int, caddr_t, ...);
- procset_t procset;
-
- setprocset(&procset, POP_AND, idtype, id, P_ALL, 0);
- return (_private__priocntlset(PC_VERSION, &procset, cmd, arg, 0));
-}
-
/*VARARGS3*/
long
diff --git a/usr/src/lib/libc/port/gen/select.c b/usr/src/lib/libc/port/gen/select.c
index 8e77866b26..d01908d0a0 100644
--- a/usr/src/lib/libc/port/gen/select.c
+++ b/usr/src/lib/libc/port/gen/select.c
@@ -20,7 +20,7 @@
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -47,6 +47,7 @@
#include "synonyms.h"
#include <values.h>
+#include <pthread.h>
#include <errno.h>
#include <sys/time.h>
#include <sys/types.h>
@@ -77,7 +78,7 @@ pselect(int nfds, fd_set *in0, fd_set *out0, fd_set *ex0,
* SUSV3: We must behave as a cancellation point even if we fail early.
*/
if (nfds < 0 || nfds > FD_SETSIZE) {
- _private_testcancel();
+ pthread_testcancel();
errno = EINVAL;
return (-1);
}
@@ -87,7 +88,7 @@ pselect(int nfds, fd_set *in0, fd_set *out0, fd_set *ex0,
/* check timespec validity */
if (tsp->tv_nsec < 0 || tsp->tv_nsec >= NANOSEC ||
tsp->tv_sec < 0) {
- _private_testcancel();
+ pthread_testcancel();
errno = EINVAL;
return (-1);
}
diff --git a/usr/src/lib/libc/port/gen/select_large_fdset.c b/usr/src/lib/libc/port/gen/select_large_fdset.c
index c933bb5c17..364b25d365 100644
--- a/usr/src/lib/libc/port/gen/select_large_fdset.c
+++ b/usr/src/lib/libc/port/gen/select_large_fdset.c
@@ -20,7 +20,7 @@
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -64,6 +64,7 @@
#include <values.h>
#include <stdlib.h>
#include <string.h>
+#include <pthread.h>
#include <errno.h>
#include <sys/time.h>
#include <sys/types.h>
@@ -110,13 +111,13 @@ pselect_large_fdset(int nfds, fd_set *in0, fd_set *out0, fd_set *ex0,
if (tsp != NULL) {
if (tsp->tv_nsec < 0 || tsp->tv_nsec >= NANOSEC ||
tsp->tv_sec < 0) {
- _private_testcancel();
+ pthread_testcancel();
errno = EINVAL;
return (-1);
}
}
} else {
- _private_testcancel();
+ pthread_testcancel();
errno = EINVAL;
return (-1);
}
@@ -146,7 +147,7 @@ pselect_large_fdset(int nfds, fd_set *in0, fd_set *out0, fd_set *ex0,
nused = 0;
/*
* nused reflects the number of pollfd structs currently used
- * less one. If realloc_fds returns 0 it is because malloc
+ * less one. If realloc_fds returns NULL it is because malloc
* failed. We expect malloc() to have done the proper
* thing with errno.
*/
@@ -165,16 +166,13 @@ pselect_large_fdset(int nfds, fd_set *in0, fd_set *out0, fd_set *ex0,
p->events |= POLLRDBAND;
if (nused < (nfds_on_list - 1)) {
p++;
- } else {
- p = realloc_fds(
- &nfds_on_list,
- &pfd_list, pfd);
- if (p == 0) {
- if (pfd_list != pfd)
+ } else if ((p = realloc_fds(
+ &nfds_on_list, &pfd_list, pfd))
+ == NULL) {
+ if (pfd_list != pfd)
(void) free(pfd_list);
- _private_testcancel();
- return (-1);
- }
+ pthread_testcancel();
+ return (-1);
}
nused++;
} else
@@ -393,7 +391,7 @@ realloc_fds(int *num, struct pollfd **list_head, struct pollfd *orig)
(void) memset(b, 0, (size_t)nta);
(void) memcpy(b, *list_head, nta / 2);
if (*list_head != orig)
- (void) free (*list_head);
+ (void) free(*list_head);
*list_head = b;
b += *num;
*num = n2;
diff --git a/usr/src/lib/libc/port/gen/sh_locks.c b/usr/src/lib/libc/port/gen/sh_locks.c
index 156efa9e85..b086da6530 100644
--- a/usr/src/lib/libc/port/gen/sh_locks.c
+++ b/usr/src/lib/libc/port/gen/sh_locks.c
@@ -20,7 +20,7 @@
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -31,6 +31,7 @@
#include <sys/types.h>
#include <synch.h>
#include <thread.h>
+#include <pthread.h>
#include "libc.h"
/*
@@ -80,10 +81,6 @@ libc_parent_atfork(void)
void
atfork_init(void)
{
- /* same as pthread_atfork() but private to libc */
- extern int _private_pthread_atfork(void (*)(void),
- void (*)(void), void (*)(void));
-
- (void) _private_pthread_atfork(libc_prepare_atfork,
- libc_parent_atfork, libc_child_atfork);
+ (void) pthread_atfork(libc_prepare_atfork,
+ libc_parent_atfork, libc_child_atfork);
}
diff --git a/usr/src/lib/libc/port/gen/sigsetops.c b/usr/src/lib/libc/port/gen/sigsetops.c
index efb41693b0..6b273de06e 100644
--- a/usr/src/lib/libc/port/gen/sigsetops.c
+++ b/usr/src/lib/libc/port/gen/sigsetops.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -29,7 +29,6 @@
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
-
/*
* POSIX signal manipulation functions.
*/
@@ -39,12 +38,6 @@
#pragma weak sigdelset = _sigdelset
#pragma weak sigismember = _sigismember
-#pragma weak _private_sigfillset = _sigfillset
-#pragma weak _private_sigemptyset = _sigemptyset
-#pragma weak _private_sigaddset = _sigaddset
-#pragma weak _private_sigdelset = _sigdelset
-#pragma weak _private_sigismember = _sigismember
-
#include "synonyms.h"
#include <sys/types.h>
#include <stdio.h>
diff --git a/usr/src/lib/libc/port/mapfile-vers b/usr/src/lib/libc/port/mapfile-vers
index 6c07dcf2d5..81e6128b9d 100644
--- a/usr/src/lib/libc/port/mapfile-vers
+++ b/usr/src/lib/libc/port/mapfile-vers
@@ -25,8 +25,15 @@
# ident "%Z%%M% %I% %E% SMI"
#
+#
+# All function names added to this or any other libc mapfile
+# must be placed under the 'protected:' designation.
+# The 'global:' designation is used *only* for data
+# items and for the members of the malloc() family.
+#
+
SUNW_1.23 { # SunOS 5.11 (Solaris 11)
- global:
+ protected:
addrtosymstr;
aio_cancel;
aiocancel;
@@ -151,15 +158,15 @@ SUNW_1.23 { # SunOS 5.11 (Solaris 11)
warnx;
} SUNW_1.22.2;
-SUNW_1.22.2 {
- global:
+SUNW_1.22.2 { # SunOS 5.10 (Solaris 10) patch additions
+ protected:
is_system_labeled;
ucred_getlabel;
_ucred_getlabel;
} SUNW_1.22.1;
-SUNW_1.22.1 {
- global:
+SUNW_1.22.1 { # SunOS 5.10 (Solaris 10) patch additions
+ protected:
atomic_add_8;
atomic_add_8_nv;
atomic_add_char = NODYNSORT;
@@ -257,7 +264,7 @@ SUNW_1.22.1 {
} SUNW_1.22;
SUNW_1.22 { # SunOS 5.10 (Solaris 10)
- global:
+ protected:
alphasort;
_alphasort;
atomic_add_16;
@@ -466,13 +473,13 @@ SUNW_1.22 { # SunOS 5.10 (Solaris 10)
wcstoumax;
} SUNW_1.21.3;
-SUNW_1.21.3 {
- global:
+SUNW_1.21.3 { # SunOS 5.9 (Solaris 9) patch additions
+ protected:
forkall;
} SUNW_1.21.2;
-SUNW_1.21.2 {
- global:
+SUNW_1.21.2 { # SunOS 5.9 (Solaris 9) patch additions
+ protected:
getustack;
_getustack;
setustack;
@@ -488,13 +495,13 @@ SUNW_1.21.2 {
_stack_violation;
} SUNW_1.21.1;
-SUNW_1.21.1 {
- global:
+SUNW_1.21.1 { # SunOS 5.9 (Solaris 9) patch additions
+ protected:
crypt_gensalt;
} SUNW_1.21;
SUNW_1.21 { # SunOS 5.9 (Solaris 9)
- global:
+ protected:
attropen;
_attropen;
bind_textdomain_codeset;
@@ -567,14 +574,14 @@ SUNW_1.21 { # SunOS 5.9 (Solaris 9)
vwscanf;
} SUNW_1.20.4;
-SUNW_1.20.4 {
- global:
+SUNW_1.20.4 { # SunOS 5.8 (Solaris 8) patch additions
+ protected:
semtimedop;
_semtimedop;
} SUNW_1.20.1;
-SUNW_1.20.1 {
- global:
+SUNW_1.20.1 { # SunOS 5.8 (Solaris 8) patch additions
+ protected:
getacct;
_getacct;
getprojid;
@@ -598,13 +605,13 @@ SUNW_1.20.1 {
} SUNW_1.20;
SUNW_1.20 { # SunOS 5.8 (Solaris 8)
- global:
+ protected:
getextmntent;
resetmnttab;
} SUNW_1.19;
SUNW_1.19 {
- global:
+ protected:
strlcat;
strlcpy;
umount2;
@@ -612,12 +619,12 @@ SUNW_1.19 {
} SUNW_1.18.1;
SUNW_1.18.1 {
- global:
+ protected:
__fsetlocking;
} SUNW_1.18;
SUNW_1.18 { # SunOS 5.7 (Solaris 7)
- global:
+ protected:
btowc;
__fbufsize;
__flbf;
@@ -679,87 +686,89 @@ SUNW_1.18 { # SunOS 5.7 (Solaris 7)
# may depend on them. All symbol content for SunOS 5.6 is now in SUNW_1.1
SUNW_1.17 {
- global:
+ protected:
SUNW_1.17;
} SUNW_1.16;
SUNW_1.16 {
- global:
+ protected:
SUNW_1.16;
} SUNW_1.15;
SUNW_1.15 {
- global:
+ protected:
SUNW_1.15;
} SUNW_1.14;
SUNW_1.14 {
- global:
+ protected:
SUNW_1.14;
} SUNW_1.13;
SUNW_1.13 {
- global:
+ protected:
SUNW_1.13;
} SUNW_1.12;
SUNW_1.12 {
- global:
+ protected:
SUNW_1.12;
} SUNW_1.11;
SUNW_1.11 {
- global:
+ protected:
SUNW_1.11;
} SUNW_1.10;
SUNW_1.10 {
- global:
+ protected:
SUNW_1.10;
} SUNW_1.9;
SUNW_1.9 {
- global:
+ protected:
SUNW_1.9;
} SUNW_1.8;
SUNW_1.8 {
- global:
+ protected:
SUNW_1.8;
} SUNW_1.7;
SUNW_1.7 {
- global:
+ protected:
SUNW_1.7;
} SUNW_1.6;
SUNW_1.6 {
- global:
+ protected:
SUNW_1.6;
} SUNW_1.5;
SUNW_1.5 {
- global:
+ protected:
SUNW_1.5;
} SUNW_1.4;
SUNW_1.4 {
- global:
+ protected:
SUNW_1.4;
} SUNW_1.3;
SUNW_1.3 {
- global:
+ protected:
SUNW_1.3;
} SUNW_1.2;
SUNW_1.2 {
- global:
+ protected:
SUNW_1.2;
} SUNW_1.1;
SUNW_1.1 { # SunOS 5.6 (Solaris 2.6)
global:
+ __loc1;
+ protected:
basename;
bindtextdomain;
bsd_signal;
@@ -805,7 +814,6 @@ SUNW_1.1 { # SunOS 5.6 (Solaris 2.6)
iswspace;
iswupper;
iswxdigit;
- __loc1;
____loc1;
_longjmp;
_lwp_sema_trywait;
@@ -945,7 +953,7 @@ SUNW_1.1 { # SunOS 5.6 (Solaris 2.6)
} SUNW_0.9;
SUNW_0.9 { # SunOS 5.5 (Solaris 2.5)
- global:
+ protected:
acl;
bcmp;
bcopy;
@@ -1011,6 +1019,8 @@ SUNW_0.9 { # SunOS 5.5 (Solaris 2.5)
SUNW_0.8 { # SunOS 5.4 (Solaris 2.4)
global:
+ __xpg4 = NODIRECT;
+ protected:
addsev;
cond_broadcast = NODYNSORT;
cond_destroy = NODYNSORT;
@@ -1074,14 +1084,23 @@ SUNW_0.8 { # SunOS 5.4 (Solaris 2.4)
vpfmt;
wordexp;
wordfree;
- __xpg4 = NODIRECT;
} SUNW_0.7;
SUNW_0.7 { # SunOS 5.3 (Solaris 2.3)
global:
+ altzone;
+ isnanf = FUNCTION FILTER libm.so.2;
+ lone;
+ lten;
+ lzero;
+ memalign = NODIRECT;
+ modff = FUNCTION FILTER libm.so.2;
+ nss_default_finders;
+ _sys_illlist;
+ valloc = NODIRECT;
+ protected:
a64l;
adjtime;
- altzone;
ascftime;
atoll;
brk;
@@ -1164,7 +1183,6 @@ SUNW_0.7 { # SunOS 5.3 (Solaris 2.3)
innetgr;
insque;
_insque;
- isnanf = FUNCTION FILTER libm.so.2;
jrand48;
l64a;
ladd;
@@ -1178,11 +1196,9 @@ SUNW_0.7 { # SunOS 5.3 (Solaris 2.3)
llseek;
lltostr;
lmul;
- lone;
lrand48;
lshiftl;
lsub;
- lten;
_lwp_cond_broadcast;
_lwp_cond_signal;
_lwp_cond_timedwait;
@@ -1198,21 +1214,17 @@ SUNW_0.7 { # SunOS 5.3 (Solaris 2.3)
_lwp_sema_post;
_lwp_sema_wait;
_lwp_suspend;
- lzero;
madvise;
__major;
__makedev;
- memalign = NODIRECT;
mincore;
__minor;
mkstemp;
_mkstemp;
mlockall;
- modff = FUNCTION FILTER libm.so.2;
mrand48;
munlockall;
nrand48;
- nss_default_finders;
_nss_netdb_aliases;
_nss_XbyY_buf_alloc;
_nss_XbyY_buf_free;
@@ -1271,7 +1283,6 @@ SUNW_0.7 { # SunOS 5.3 (Solaris 2.3)
strtoull;
swapctl;
sysfs;
- _sys_illlist;
syslog;
_syslog;
tmpnam_r;
@@ -1287,7 +1298,6 @@ SUNW_0.7 { # SunOS 5.3 (Solaris 2.3)
utimes;
utmpname;
utmpxname;
- valloc = NODIRECT;
vfork;
vhangup;
vsyslog;
@@ -1299,6 +1309,51 @@ SUNW_0.7 { # SunOS 5.3 (Solaris 2.3)
SUNWprivate_1.1 {
global:
+ ___Argv = NODIRECT;
+ cfree = NODIRECT;
+ _cswidth;
+ __ctype_mask;
+ __environ_lock = NODIRECT;
+ __inf_read;
+ __inf_written;
+ __i_size;
+ _isnanf = FUNCTION FILTER libm.so.2;
+ __lc_charmap;
+ __lc_collate;
+ __lc_ctype;
+ __lc_locale;
+ __lc_messages;
+ __lc_monetary;
+ __lc_numeric;
+ __lc_time;
+ __libc_threaded;
+ _lib_version = NODIRECT;
+ _logb = FUNCTION FILTER libm.so.2;
+ _lone = NODYNSORT;
+ _lten;
+ _lzero = NODYNSORT;
+ __malloc_lock;
+ _modff = FUNCTION FILTER libm.so.2;
+ __nan_read;
+ __nan_written;
+ __nis_debug_bind;
+ __nis_debug_calls;
+ __nis_debug_file;
+ __nis_debug_rpc;
+ __nis_prefsrv;
+ __nis_preftype;
+ __nis_server;
+ _nss_default_finders;
+ _smbuf;
+ _sp;
+ _tdb_bootstrap;
+ __threaded;
+ thr_probe_getfunc_addr;
+ __trans_lower;
+ __trans_upper;
+ _uberdata;
+ __xpg6 = NODIRECT;
+ protected:
__accessat;
_a64l;
acctctl;
@@ -1306,7 +1361,6 @@ SUNWprivate_1.1 {
_acl;
_adjtime;
allocids;
- ___Argv = NODIRECT;
_ascftime;
_asctime_r;
_assert_c99;
@@ -1426,7 +1480,6 @@ SUNWprivate_1.1 {
__btowc_euc;
__btowc_sb;
_bufsync;
- cfree = NODIRECT;
_cftime;
__charmap_init;
_cladm;
@@ -1473,11 +1526,9 @@ SUNWprivate_1.1 {
_core_set_process_content;
core_set_process_path;
_core_set_process_path;
- _cswidth;
_ctermid_r;
_ctime_r;
__ctype_init;
- __ctype_mask;
dbm_close_status;
dbm_do_nextkey;
dbm_setdefwrite;
@@ -1521,7 +1572,6 @@ SUNWprivate_1.1 {
_endspent;
_endutent;
_endutxent;
- __environ_lock = NODIRECT;
_erand48;
_err;
_errfp;
@@ -1631,13 +1681,14 @@ SUNWprivate_1.1 {
_getzonenamebyid;
_gmtime_r;
_gsignal;
+ gtty;
+ _gtty;
+ _hasmntopt;
_iconv;
_iconv_close;
_iconv_open;
idmap_reg;
idmap_unreg;
- __inf_read;
- __inf_written;
__init_daemon_priv;
__init_suid_priv;
_insert;
@@ -1645,8 +1696,6 @@ SUNWprivate_1.1 {
_inst_sync;
_is_euc_fc;
_is_euc_pc;
- __i_size;
- _isnanf = FUNCTION FILTER libm.so.2;
_is_system_labeled;
_iswctype;
__iswctype_bc;
@@ -1663,22 +1712,12 @@ SUNWprivate_1.1 {
klpd_unregister_id;
_l64a;
_ladd;
- __lc_charmap;
- __lc_collate;
- __lc_ctype;
_lckpwdf;
- __lc_locale;
- __lc_messages;
- __lc_monetary;
- __lc_numeric;
_lcong48;
- __lc_time;
_ldivide;
_lexp10;
_lgrp_home_fast = NODYNSORT;
_lgrpsys;
- __libc_threaded;
- _lib_version = NODIRECT;
_llabs;
_lldiv;
_llog10;
@@ -1690,12 +1729,9 @@ SUNWprivate_1.1 {
_localtime_r;
_lock_clear;
_lock_try;
- _logb = FUNCTION FILTER libm.so.2;
- _lone = NODYNSORT;
_lrand48;
_lshiftl;
_lsub;
- _lten;
_ltzset;
__lwp_cond_broadcast;
__lwp_cond_reltimedwait;
@@ -1715,13 +1751,11 @@ SUNWprivate_1.1 {
__lwp_sema_trywait;
__lwp_sema_wait;
__lwp_suspend;
- _lzero = NODYNSORT;
_madvise;
makeut;
_makeut;
makeutx;
_makeutx;
- __malloc_lock;
_mbftowc;
__mbftowc_dense;
__mbftowc_euc;
@@ -1760,7 +1794,6 @@ SUNWprivate_1.1 {
_mlockall;
mntopt;
modctl;
- _modff = FUNCTION FILTER libm.so.2;
modutx;
_modutx;
__monetary_init;
@@ -1784,25 +1817,15 @@ SUNWprivate_1.1 {
__mutex_unlock;
name_to_attr;
_nanosleep;
- __nan_read;
- __nan_written;
nfs_getfh;
_nfs_getfh;
nfssvc;
_nfssvc;
_nfssys;
- __nis_debug_bind;
- __nis_debug_calls;
- __nis_debug_file;
- __nis_debug_rpc;
__nis_get_environment;
- __nis_prefsrv;
- __nis_preftype;
- __nis_server;
__nl_langinfo_std;
_nrand48;
_nss_db_state_destr;
- _nss_default_finders;
nss_default_key2str;
nss_delete;
_nss_delete;
@@ -2018,7 +2041,6 @@ SUNWprivate_1.1 {
_rw_unlock = NODYNSORT;
_rw_wrlock = NODYNSORT;
_sbrk_grow_aligned;
- _sbrk_unlocked;
_schedctl_exit;
_schedctl_init;
_schedctl_lookup = NODYNSORT;
@@ -2082,7 +2104,6 @@ SUNWprivate_1.1 {
_sigwait;
_sigwaitinfo;
_single_to_decimal;
- _smbuf;
_so_accept;
_so_bind;
_sockconfig;
@@ -2101,7 +2122,6 @@ SUNWprivate_1.1 {
_so_shutdown;
_so_socket;
_so_socketpair;
- _sp;
_srand48;
_ssignal;
_statfs;
@@ -2133,7 +2153,6 @@ SUNWprivate_1.1 {
_sysconfig;
_sysfs;
__systemcall;
- _tdb_bootstrap;
_thr_continue;
thr_continue_allmutators;
_thr_continue_allmutators;
@@ -2141,7 +2160,6 @@ SUNWprivate_1.1 {
_thr_continue_mutator;
_thr_create;
_thr_detach;
- __threaded;
_thr_exit = NODYNSORT;
_thr_getconcurrency;
_thr_get_inf_read;
@@ -2159,7 +2177,6 @@ SUNWprivate_1.1 {
_thr_min_stack = NODYNSORT;
thr_mutators_barrier;
_thr_mutators_barrier;
- thr_probe_getfunc_addr;
thr_probe_setup;
_thr_schedctl;
_thr_self = NODYNSORT;
@@ -2198,8 +2215,6 @@ SUNWprivate_1.1 {
__towlower_std;
__towupper_bc;
__towupper_std;
- __trans_lower;
- __trans_upper;
_truncate;
_trwctype;
__trwctype_std;
@@ -2207,7 +2222,6 @@ SUNWprivate_1.1 {
_ttyname_r;
_ttyslot;
_uadmin;
- _uberdata;
_ucred_alloc;
ucred_getamask;
_ucred_getamask;
@@ -2299,7 +2313,6 @@ SUNWprivate_1.1 {
_wrtchk;
_xflsbuf;
_xgetwidth;
- __xpg6 = NODIRECT;
_yield;
zone_add_datalink;
zone_boot;
@@ -2318,43 +2331,6 @@ SUNWprivate_1.1 {
zone_version;
local:
__imax_lldiv = NODYNSORT;
- _private_execve = NODYNSORT;
- _private_exit = NODYNSORT;
- _private_fcntl = NODYNSORT;
- _private_forkallx = NODYNSORT;
- _private_forkx = NODYNSORT;
- _private_fstat = NODYNSORT;
- _private_geteuid = NODYNSORT;
- _private_getcontext = NODYNSORT;
- _private_getgid = NODYNSORT;
- _private_getpid = NODYNSORT;
- _private_getrlimit = NODYNSORT;
- _private_getuid = NODYNSORT;
- _private_ioctl = NODYNSORT;
- _private_lwp_mutex_lock = NODYNSORT;
- _private_lwp_mutex_unlock = NODYNSORT;
- _private_mmap = NODYNSORT;
- _private_mprotect = NODYNSORT;
- _private_munmap = NODYNSORT;
- _private_mutex_destroy = NODYNSORT;
- _private_mutex_init = NODYNSORT;
- _private_mutex_lock = NODYNSORT;
- _private_mutex_trylock = NODYNSORT;
- _private_mutex_unlock = NODYNSORT;
- _private_memcpy = NODYNSORT;
- _private_memset = NODYNSORT;
- _private_pthread_atfork = NODYNSORT;
- _private_setgid = NODYNSORT;
- _private_setpgid = NODYNSORT;
- _private_setuid = NODYNSORT;
- _private_setustack = NODYNSORT;
- _private_sigaddset = NODYNSORT;
- _private_sigdelset = NODYNSORT;
- _private_sigemptyset = NODYNSORT;
- _private_sigfillset = NODYNSORT;
- _private_sigismember = NODYNSORT;
- _private_stat = NODYNSORT;
- _private_testcancel = NODYNSORT;
_ti_thr_self = NODYNSORT;
rw_read_is_held = NODYNSORT;
rw_write_is_held = NODYNSORT;
diff --git a/usr/src/lib/libc/port/rt/pos4obj.c b/usr/src/lib/libc/port/rt/pos4obj.c
index 1351ae6a14..3dc20cb761 100644
--- a/usr/src/lib/libc/port/rt/pos4obj.c
+++ b/usr/src/lib/libc/port/rt/pos4obj.c
@@ -41,6 +41,7 @@
#include <dirent.h>
#include <stdio.h>
#include <dlfcn.h>
+#include <atomic.h>
#include <md5.h>
#include "pos4obj.h"
@@ -102,19 +103,18 @@ static void
load_md5_calc(void)
{
void *md5_handle = dlopen("libmd.so.1", RTLD_LAZY);
+ md5_calc_t md5_calc = (md5_handle == NULL)? NULL :
+ (md5_calc_t)dlsym(md5_handle, "md5_calc");
lmutex_lock(&md5_lock);
if (real_md5_calc == NULL) {
- if (md5_handle == NULL)
+ if (md5_calc == NULL)
real_md5_calc = (md5_calc_t)(-1);
else {
- real_md5_calc =
- (md5_calc_t)dlsym(md5_handle, "md5_calc");
- if (real_md5_calc != NULL) /* got it */
- md5_handle = NULL; /* don't dlclose it */
- else
- real_md5_calc = (md5_calc_t)(-1);
+ real_md5_calc = md5_calc;
+ md5_handle = NULL; /* don't dlclose it */
}
+ membar_producer();
}
lmutex_unlock(&md5_lock);
diff --git a/usr/src/lib/libc/port/rt/sched.c b/usr/src/lib/libc/port/rt/sched.c
index 2a9b62718d..df1be0e7ad 100644
--- a/usr/src/lib/libc/port/rt/sched.c
+++ b/usr/src/lib/libc/port/rt/sched.c
@@ -118,8 +118,7 @@ get_info_by_policy(int policy)
/* policy number not defined in <sched.h> */
ASSERT(policy >= _SCHED_NEXT);
pccp->pcc_info.pc_cid = policy - _SCHED_NEXT;
- if (_private_priocntl(0, 0, PC_GETCLINFO, &pccp->pcc_info)
- == -1 ||
+ if (priocntl(0, 0, PC_GETCLINFO, &pccp->pcc_info) == -1 ||
(base = is_base_class(pccp->pcc_info.pc_clname)) != 0) {
pccp->pcc_info.pc_clname[0] = '\0';
pccp->pcc_info.pc_cid = -1;
@@ -138,7 +137,7 @@ get_info_by_policy(int policy)
}
pccp->pcc_policy = policy;
} else if (policy != SCHED_SYS &&
- _private_priocntl(0, 0, PC_GETCID, &pccp->pcc_info) == -1) {
+ priocntl(0, 0, PC_GETCID, &pccp->pcc_info) == -1) {
_membar_producer();
pccp->pcc_state = -1;
errno = EINVAL;
@@ -164,7 +163,7 @@ get_info_by_policy(int policy)
* not defined in <sched.h>.
*/
pcpri.pc_cid = pccp->pcc_info.pc_cid;
- if (_private_priocntl(0, 0, PC_GETPRIRANGE, &pcpri) == 0) {
+ if (priocntl(0, 0, PC_GETPRIRANGE, &pcpri) == 0) {
pccp->pcc_primin = pcpri.pc_clpmin;
pccp->pcc_primax = pcpri.pc_clpmax;
}
@@ -198,7 +197,7 @@ get_info_by_class(id_t classid)
}
pcinfo.pc_cid = classid;
- if (_private_priocntl(0, 0, PC_GETCLINFO, &pcinfo) == -1) {
+ if (priocntl(0, 0, PC_GETCLINFO, &pcinfo) == -1) {
if (classid == 0) /* no kernel info for sys class */
return (get_info_by_policy(SCHED_SYS));
return (NULL);
@@ -237,7 +236,7 @@ static const pcclass_t *
get_parms(idtype_t idtype, id_t id, pcparms_t *pcparmp)
{
pcparmp->pc_cid = PC_CLNULL;
- if (_private_priocntl(idtype, id, PC_GETPARMS, pcparmp) == -1)
+ if (priocntl(idtype, id, PC_GETPARMS, pcparmp) == -1)
return (NULL);
return (get_info_by_class(pcparmp->pc_cid));
}
@@ -280,14 +279,14 @@ set_priority(idtype_t idtype, id_t id, int policy, int prio,
pcprio.pc_cid = pcparmp->pc_cid;
pcprio.pc_val = prio;
do {
- rv = _private_priocntl(idtype, id, PC_DOPRIO, &pcprio);
+ rv = priocntl(idtype, id, PC_DOPRIO, &pcprio);
} while (rv == -1 && errno == ENOMEM);
return (rv);
}
}
do {
- rv = _private_priocntl(idtype, id, PC_SETPARMS, pcparmp);
+ rv = priocntl(idtype, id, PC_SETPARMS, pcparmp);
} while (rv == -1 && errno == ENOMEM);
return (rv);
}
@@ -376,7 +375,7 @@ getparam(idtype_t idtype, id_t id, int *policyp, struct sched_param *param)
pcprio.pc_op = PC_GETPRIO;
pcprio.pc_cid = 0;
pcprio.pc_val = 0;
- if (_private_priocntl(idtype, id, PC_DOPRIO, &pcprio) == 0)
+ if (priocntl(idtype, id, PC_DOPRIO, &pcprio) == 0)
priority = pcprio.pc_val;
else
priority = 0;
@@ -479,7 +478,7 @@ sched_getscheduler(pid_t pid)
int
sched_yield(void)
{
- thr_yield();
+ yield();
return (0);
}
@@ -622,7 +621,7 @@ update_sched(ulwp_t *self)
pcprio.pc_op = PC_GETPRIO;
pcprio.pc_cid = 0;
pcprio.pc_val = 0;
- if (_private_priocntl(P_LWPID, P_MYID, PC_DOPRIO, &pcprio) == 0)
+ if (priocntl(P_LWPID, P_MYID, PC_DOPRIO, &pcprio) == 0)
priority = pcprio.pc_val;
else
priority = 0;
diff --git a/usr/src/lib/libc/port/stdio/flockf.c b/usr/src/lib/libc/port/stdio/flockf.c
index ce5ee78a5d..ac9db7ccae 100644
--- a/usr/src/lib/libc/port/stdio/flockf.c
+++ b/usr/src/lib/libc/port/stdio/flockf.c
@@ -72,7 +72,7 @@ ftrylockfile(FILE *iop)
rmutex_t *rl = IOB_LCK(iop);
if (rl != NULL)
- return (_private_mutex_trylock(rl));
+ return (mutex_trylock(rl));
return (0); /* can't happen? */
}
@@ -82,7 +82,7 @@ flockfile(FILE *iop)
rmutex_t *rl = IOB_LCK(iop);
if (rl != NULL)
- _private_mutex_lock(rl);
+ mutex_lock(rl);
}
void
@@ -91,7 +91,7 @@ funlockfile(FILE *iop)
rmutex_t *rl = IOB_LCK(iop);
if (rl != NULL)
- _private_mutex_unlock(rl);
+ mutex_unlock(rl);
}
int
diff --git a/usr/src/lib/libc/port/stdio/flush.c b/usr/src/lib/libc/port/stdio/flush.c
index a7d9fabdbb..9d87b8c4fd 100644
--- a/usr/src/lib/libc/port/stdio/flush.c
+++ b/usr/src/lib/libc/port/stdio/flush.c
@@ -163,7 +163,7 @@ __cleanup(void) /* called at process end to flush ouput streams */
void
stdio_locks()
{
- (void) _private_mutex_lock(&_first_link_lock);
+ (void) mutex_lock(&_first_link_lock);
/*
* XXX: We should acquire all of the iob locks here.
*/
@@ -175,7 +175,7 @@ stdio_unlocks()
/*
* XXX: We should release all of the iob locks here.
*/
- (void) _private_mutex_unlock(&_first_link_lock);
+ (void) mutex_unlock(&_first_link_lock);
}
void
@@ -365,16 +365,14 @@ rescan:
#ifdef _LP64
fp = hdr->iobp;
for (i = 0; i < FILE_ARY_SZ; i++)
- _private_mutex_init(&fp[i]._lock,
- USYNC_THREAD|LOCK_RECURSIVE, NULL);
+ mutex_init(&fp[i]._lock, USYNC_THREAD | LOCK_RECURSIVE, NULL);
#else
xfp = hdr->iobp;
fp = &xfp->_iob;
for (i = 0; i < FILE_ARY_SZ; i++) {
xfp[i].xmagic = XMAGIC(&xfp[i]);
- _private_mutex_init(&xfp[i].xlock,
- USYNC_THREAD|LOCK_RECURSIVE, NULL);
+ mutex_init(&xfp[i].xlock, USYNC_THREAD | LOCK_RECURSIVE, NULL);
}
#endif /* _LP64 */
diff --git a/usr/src/lib/libc/port/sys/libc_fcntl.c b/usr/src/lib/libc/port/sys/libc_fcntl.c
index b474123486..4cb69394ba 100644
--- a/usr/src/lib/libc/port/sys/libc_fcntl.c
+++ b/usr/src/lib/libc/port/sys/libc_fcntl.c
@@ -52,15 +52,6 @@
#include <stdlib.h>
#include "libc.h"
-/*
- * We must be careful to call only functions that are private
- * to libc here, to avoid invoking the dynamic linker.
- * This is important because _private_fcntl() is called from
- * posix_spawn() after vfork() and we must never invoke the
- * dynamic linker in a vfork() child.
- */
-
-extern int _private_ioctl(int, int, ...);
extern int __fcntl_syscall(int fd, int cmd, ...);
#if !defined(_LP64)
@@ -75,11 +66,10 @@ extern int __fcntl_syscall(int fd, int cmd, ...);
int
_s_ioctl(int fd, int cmd, intptr_t arg)
{
- return (_private_ioctl(fd, cmd, arg));
+ return (ioctl(fd, cmd, arg));
}
#endif /* _LP64 */
-#pragma weak _private_fcntl = __fcntl
int
__fcntl(int fd, int cmd, ...)
{
@@ -95,10 +85,10 @@ __fcntl(int fd, int cmd, ...)
switch (cmd) {
case F_SETOWN:
pid = (int)arg;
- return (_private_ioctl(fd, FIOSETOWN, &pid));
+ return (ioctl(fd, FIOSETOWN, &pid));
case F_GETOWN:
- if (_private_ioctl(fd, FIOGETOWN, &res) < 0)
+ if (ioctl(fd, FIOGETOWN, &res) < 0)
return (-1);
return (res);
diff --git a/usr/src/lib/libc/port/sys/libc_open.c b/usr/src/lib/libc/port/sys/libc_open.c
index 1a9cc4a017..42629f8bbf 100644
--- a/usr/src/lib/libc/port/sys/libc_open.c
+++ b/usr/src/lib/libc/port/sys/libc_open.c
@@ -52,15 +52,6 @@ static void push_module(int fd);
static int isptsfd(int fd);
static void itoa(int i, char *ptr);
-/*
- * We must be careful to call only functions that are private
- * to libc here, to avoid invoking the dynamic linker.
- * This is important because _private_open() and _private_open64()
- * are called from posix_spawn() after vfork() and we must never
- * invoke the dynamic linker in a vfork() child.
- */
-
-#pragma weak _private_open = __open
int
__open(const char *fname, int oflag, ...)
{
@@ -89,7 +80,6 @@ __open(const char *fname, int oflag, ...)
* The 32-bit APIs to large files require this interposition.
* The 64-bit APIs just fall back to __open() above.
*/
-#pragma weak _private_open64 = __open64
int
__open64(const char *fname, int oflag, ...)
{
@@ -121,12 +111,6 @@ __open64(const char *fname, int oflag, ...)
static int
isptsfd(int fd)
{
-#if defined(_LP64)
-#define _private_stat64 _private_stat
-#define _private_fstat64 _private_fstat
-#endif
- extern int _private_stat64(const char *, struct stat64 *);
- extern int _private_fstat64(int, struct stat64 *);
char buf[TTYNAME_MAX];
char *str1 = buf;
const char *str2 = "/dev/pts/";
@@ -134,7 +118,7 @@ isptsfd(int fd)
int oerrno = errno;
int rval = 0;
- if (_private_fstat64(fd, &fsb) == 0 && S_ISCHR(fsb.st_mode)) {
+ if (fstat64(fd, &fsb) == 0 && S_ISCHR(fsb.st_mode)) {
/*
* Do this without strcpy() or strlen(),
* to avoid invoking the dynamic linker.
@@ -145,7 +129,7 @@ isptsfd(int fd)
* Inline version of minor(dev), to avoid the dynamic linker.
*/
itoa(fsb.st_rdev & MAXMIN, str1);
- if (_private_stat64(buf, &stb) == 0)
+ if (stat64(buf, &stb) == 0)
rval = (stb.st_rdev == fsb.st_rdev);
}
errno = oerrno;
@@ -181,7 +165,6 @@ itoa(int i, char *ptr)
static void
push_module(int fd)
{
- extern int _private_ioctl(int, int, ...);
struct strioctl istr;
int oerrno = errno;
@@ -189,15 +172,15 @@ push_module(int fd)
istr.ic_len = 0;
istr.ic_timout = 0;
istr.ic_dp = NULL;
- if (_private_ioctl(fd, I_STR, &istr) != -1) {
- (void) _private_ioctl(fd, __I_PUSH_NOCTTY, "ptem");
- (void) _private_ioctl(fd, __I_PUSH_NOCTTY, "ldterm");
- (void) _private_ioctl(fd, __I_PUSH_NOCTTY, "ttcompat");
+ if (ioctl(fd, I_STR, &istr) != -1) {
+ (void) ioctl(fd, __I_PUSH_NOCTTY, "ptem");
+ (void) ioctl(fd, __I_PUSH_NOCTTY, "ldterm");
+ (void) ioctl(fd, __I_PUSH_NOCTTY, "ttcompat");
istr.ic_cmd = PTSSTTY;
istr.ic_len = 0;
istr.ic_timout = 0;
istr.ic_dp = NULL;
- (void) _private_ioctl(fd, I_STR, &istr);
+ (void) ioctl(fd, I_STR, &istr);
}
errno = oerrno;
}
diff --git a/usr/src/lib/libc/port/sys/lwp.c b/usr/src/lib/libc/port/sys/lwp.c
index 4343bef1c5..69882e116d 100644
--- a/usr/src/lib/libc/port/sys/lwp.c
+++ b/usr/src/lib/libc/port/sys/lwp.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -21,13 +20,12 @@
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
-#pragma weak _private_lwp_mutex_lock = __lwp_mutex_lock
#pragma weak _lwp_mutex_lock = __lwp_mutex_lock
#pragma weak _lwp_mutex_trylock = __lwp_mutex_trylock
#pragma weak _lwp_sema_init = __lwp_sema_init
diff --git a/usr/src/lib/libc/port/sys/pgrpsys.c b/usr/src/lib/libc/port/sys/pgrpsys.c
index d7ed0bfb26..f155f0d861 100644
--- a/usr/src/lib/libc/port/sys/pgrpsys.c
+++ b/usr/src/lib/libc/port/sys/pgrpsys.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -32,7 +32,6 @@
#pragma weak setsid = _setsid
#pragma weak getpgid = _getpgid
#pragma weak setpgid = _setpgid
-#pragma weak _private_setpgid = _setpgid
#include "synonyms.h"
#include <sys/types.h>
diff --git a/usr/src/lib/libc/port/sys/sbrk.c b/usr/src/lib/libc/port/sys/sbrk.c
index 6942e663c3..2d1ec6eeb8 100644
--- a/usr/src/lib/libc/port/sys/sbrk.c
+++ b/usr/src/lib/libc/port/sys/sbrk.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -45,7 +45,7 @@ void *_nd = &_end;
mutex_t __sbrk_lock = DEFAULTMUTEX;
extern int _brk_unlocked(void *);
-void *_sbrk_unlocked(intptr_t);
+static void *_sbrk_unlocked(intptr_t);
/*
* The break must always be at least 8-byte aligned
@@ -63,6 +63,10 @@ sbrk(intptr_t addend)
{
void *result;
+ if (!primary_link_map) {
+ errno = ENOTSUP;
+ return ((void *)-1);
+ }
lmutex_lock(&__sbrk_lock);
result = _sbrk_unlocked(addend);
lmutex_unlock(&__sbrk_lock);
@@ -80,16 +84,12 @@ sbrk(intptr_t addend)
* - the addend is negative and brk + addend < 0.
* - the addend is positive and brk + addend > ULONG_MAX
*/
-void *
+static void *
_sbrk_unlocked(intptr_t addend)
{
char *old_brk = BRKALIGN(_nd);
char *new_brk = BRKALIGN(old_brk + addend);
- if (!primary_link_map) {
- errno = ENOTSUP;
- return ((void *)-1);
- }
if ((addend > 0 && new_brk < old_brk) ||
(addend < 0 && new_brk > old_brk)) {
errno = ENOMEM;
diff --git a/usr/src/lib/libc/port/sys/ucontext.c b/usr/src/lib/libc/port/sys/ucontext.c
index 56d3984691..f86e8c06c1 100644
--- a/usr/src/lib/libc/port/sys/ucontext.c
+++ b/usr/src/lib/libc/port/sys/ucontext.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -28,8 +28,6 @@
#pragma weak getustack = _getustack
#pragma weak setustack = _setustack
-#pragma weak _private_setustack = _setustack
-#pragma weak __setcontext_syscall = __setcontext
#include "synonyms.h"
#include <ucontext.h>
diff --git a/usr/src/lib/libc/port/threads/alloc.c b/usr/src/lib/libc/port/threads/alloc.c
index fb0eb4c811..1751e76708 100644
--- a/usr/src/lib/libc/port/threads/alloc.c
+++ b/usr/src/lib/libc/port/threads/alloc.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -109,7 +109,7 @@ initial_allocation(bucket_t *bp) /* &__uberdata.bucket[0] */
* We do this seemingly obtuse call to __systemcall6(SYS_mmap)
* instead of simply calling mmap() directly because, if the
* mmap() system call fails, we must make sure that __cerror()
- * is not called, because that would call _private___errno()
+ * is not called, because that would call ___errno()
* which would dereference curthread and, because we are very
* early in libc initialization, curthread is NULL and we would
* draw a hard-to-debug SIGSEGV core dump, or worse.
@@ -196,8 +196,8 @@ lmalloc(size_t size)
if (bucketnum >= NBUCKETS) {
/* mmap() allocates memory already set to zero */
- ptr = _private_mmap((void *)CHUNKSIZE, size, prot,
- MAP_PRIVATE|MAP_ANON|MAP_ALIGN, -1, (off_t)0);
+ ptr = mmap((void *)CHUNKSIZE, size, prot,
+ MAP_PRIVATE|MAP_ANON|MAP_ALIGN, -1, (off_t)0);
if (ptr == MAP_FAILED)
ptr = NULL;
return (ptr);
@@ -233,8 +233,8 @@ lmalloc(size_t size)
for (;;) {
bsize = CHUNKSIZE * bp->chunks;
n = bsize / size;
- ptr = _private_mmap((void *)CHUNKSIZE, bsize, prot,
- MAP_PRIVATE|MAP_ANON|MAP_ALIGN, -1, (off_t)0);
+ ptr = mmap((void *)CHUNKSIZE, bsize, prot,
+ MAP_PRIVATE|MAP_ANON|MAP_ALIGN, -1, (off_t)0);
if (ptr != MAP_FAILED)
break;
/* try a smaller chunk allocation */
@@ -279,7 +279,7 @@ lfree(void *ptr, size_t size)
/* see comment below */
if (((uintptr_t)ptr & (CHUNKSIZE - 1)) != 0)
goto bad;
- (void) _private_munmap(ptr, size);
+ (void) munmap(ptr, size);
return;
}
@@ -297,7 +297,7 @@ lfree(void *ptr, size_t size)
/*
* Zeroing the memory here saves time later when reallocating it.
*/
- (void) _private_memset(ptr, 0, size);
+ (void) memset(ptr, 0, size);
if ((self = __curthread()) == NULL)
bp = &__uberdata.bucket[bucketnum];
@@ -367,7 +367,7 @@ libc_realloc(void *old, size_t size)
ptr = (private_header_t *)old - 1;
if (size >= ptr->private_size)
size = ptr->private_size;
- (void) _memcpy(new, old, size - sizeof (*ptr));
+ (void) memcpy(new, old, size - sizeof (*ptr));
lfree(ptr, ptr->private_size);
}
return (new);
diff --git a/usr/src/lib/libc/port/threads/assfail.c b/usr/src/lib/libc/port/threads/assfail.c
index dbb4b2dd4d..5a911d2875 100644
--- a/usr/src/lib/libc/port/threads/assfail.c
+++ b/usr/src/lib/libc/port/threads/assfail.c
@@ -52,7 +52,7 @@ __set_panicstr(const char *msg)
void
grab_assert_lock()
{
- (void) _private_lwp_mutex_lock(&assert_lock);
+ (void) _lwp_mutex_lock(&assert_lock);
}
static void
@@ -73,17 +73,17 @@ Abort(const char *msg)
}
/* set SIGABRT signal handler to SIG_DFL w/o grabbing any locks */
- (void) _private_memset(&act, 0, sizeof (act));
+ (void) memset(&act, 0, sizeof (act));
act.sa_sigaction = SIG_DFL;
(void) __sigaction(SIGABRT, &act, NULL);
/* delete SIGABRT from the signal mask */
- (void) _private_sigemptyset(&sigmask);
- (void) _private_sigaddset(&sigmask, SIGABRT);
+ (void) sigemptyset(&sigmask);
+ (void) sigaddset(&sigmask, SIGABRT);
(void) __lwp_sigmask(SIG_UNBLOCK, &sigmask, NULL);
(void) __lwp_kill(lwpid, SIGABRT); /* never returns */
- (void) _kill(_private_getpid(), SIGABRT); /* if it does, try harder */
+ (void) _kill(getpid(), SIGABRT); /* if it does, try harder */
_exit(127);
}
@@ -100,9 +100,9 @@ common_panic(const char *head, const char *why)
if ((self = __curthread()) != NULL)
enter_critical(self);
- (void) _private_lwp_mutex_lock(&assert_lock);
+ (void) _lwp_mutex_lock(&assert_lock);
- (void) _private_memset(msg, 0, sizeof (msg));
+ (void) memset(msg, 0, sizeof (msg));
(void) strcpy(msg, head);
len1 = strlen(msg);
len2 = strlen(why);
@@ -174,17 +174,17 @@ lock_error(const mutex_t *mp, const char *who, void *cv, const char *msg)
if (assert_thread == self)
_exit(127);
enter_critical(self);
- (void) _private_lwp_mutex_lock(&assert_lock);
+ (void) _lwp_mutex_lock(&assert_lock);
assert_thread = self;
lwpid = self->ul_lwpid;
udp = self->ul_uberdata;
pid = udp->pid;
} else {
self = NULL;
- (void) _private_lwp_mutex_lock(&assert_lock);
+ (void) _lwp_mutex_lock(&assert_lock);
lwpid = __lwp_self();
udp = &__uberdata;
- pid = _private_getpid();
+ pid = getpid();
}
(void) strcpy(buf,
@@ -232,7 +232,7 @@ lock_error(const mutex_t *mp, const char *who, void *cv, const char *msg)
if (udp->uberflags.uf_thread_error_detection >= 2)
Abort(buf);
assert_thread = NULL;
- (void) _private_lwp_mutex_unlock(&assert_lock);
+ (void) _lwp_mutex_unlock(&assert_lock);
if (self != NULL)
exit_critical(self);
}
@@ -261,17 +261,17 @@ rwlock_error(const rwlock_t *rp, const char *who, const char *msg)
if (assert_thread == self)
_exit(127);
enter_critical(self);
- (void) _private_lwp_mutex_lock(&assert_lock);
+ (void) _lwp_mutex_lock(&assert_lock);
assert_thread = self;
lwpid = self->ul_lwpid;
udp = self->ul_uberdata;
pid = udp->pid;
} else {
self = NULL;
- (void) _private_lwp_mutex_lock(&assert_lock);
+ (void) _lwp_mutex_lock(&assert_lock);
lwpid = __lwp_self();
udp = &__uberdata;
- pid = _private_getpid();
+ pid = getpid();
}
rwstate = (uint32_t)rcopy.rwlock_readers;
@@ -316,7 +316,7 @@ rwlock_error(const rwlock_t *rp, const char *who, const char *msg)
if (udp->uberflags.uf_thread_error_detection >= 2)
Abort(buf);
assert_thread = NULL;
- (void) _private_lwp_mutex_unlock(&assert_lock);
+ (void) _lwp_mutex_unlock(&assert_lock);
if (self != NULL)
exit_critical(self);
}
@@ -340,13 +340,13 @@ thread_error(const char *msg)
if (assert_thread == self)
_exit(127);
enter_critical(self);
- (void) _private_lwp_mutex_lock(&assert_lock);
+ (void) _lwp_mutex_lock(&assert_lock);
assert_thread = self;
lwpid = self->ul_lwpid;
udp = self->ul_uberdata;
} else {
self = NULL;
- (void) _private_lwp_mutex_lock(&assert_lock);
+ (void) _lwp_mutex_lock(&assert_lock);
lwpid = __lwp_self();
udp = &__uberdata;
}
@@ -364,7 +364,7 @@ thread_error(const char *msg)
if (udp->uberflags.uf_thread_error_detection >= 2)
Abort(buf);
assert_thread = NULL;
- (void) _private_lwp_mutex_unlock(&assert_lock);
+ (void) _lwp_mutex_unlock(&assert_lock);
if (self != NULL)
exit_critical(self);
}
@@ -389,12 +389,12 @@ __assfail(const char *assertion, const char *filename, int line_num)
if (assert_thread == self)
_exit(127);
enter_critical(self);
- (void) _private_lwp_mutex_lock(&assert_lock);
+ (void) _lwp_mutex_lock(&assert_lock);
assert_thread = self;
lwpid = self->ul_lwpid;
} else {
self = NULL;
- (void) _private_lwp_mutex_lock(&assert_lock);
+ (void) _lwp_mutex_lock(&assert_lock);
lwpid = __lwp_self();
}
@@ -414,7 +414,7 @@ __assfail(const char *assertion, const char *filename, int line_num)
* We could replace the call to Abort() with the following code
* if we want just to issue a warning message and not die.
* assert_thread = NULL;
- * _private_lwp_mutex_unlock(&assert_lock);
+ * _lwp_mutex_unlock(&assert_lock);
* if (self != NULL)
* exit_critical(self);
*/
diff --git a/usr/src/lib/libc/port/threads/cancel.c b/usr/src/lib/libc/port/threads/cancel.c
index 77605bcf42..5236ff5073 100644
--- a/usr/src/lib/libc/port/threads/cancel.c
+++ b/usr/src/lib/libc/port/threads/cancel.c
@@ -204,7 +204,6 @@ _pthread_setcanceltype(int type, int *oldtype)
* it by calling thr_exit. thr_exit takes care of calling
* cleanup handlers.
*/
-#pragma weak _private_testcancel = _pthread_testcancel
#pragma weak pthread_testcancel = _pthread_testcancel
void
_pthread_testcancel(void)
diff --git a/usr/src/lib/libc/port/threads/pthr_attr.c b/usr/src/lib/libc/port/threads/pthr_attr.c
index dc7056c067..8809209083 100644
--- a/usr/src/lib/libc/port/threads/pthr_attr.c
+++ b/usr/src/lib/libc/port/threads/pthr_attr.c
@@ -118,7 +118,7 @@ _pthread_attr_equal(const pthread_attr_t *attr1, const pthread_attr_t *attr2)
if (ap1 == NULL || ap2 == NULL)
return (0);
- return (ap1 == ap2 || _memcmp(ap1, ap2, sizeof (thrattr_t)) == 0);
+ return (ap1 == ap2 || memcmp(ap1, ap2, sizeof (thrattr_t)) == 0);
}
/*
diff --git a/usr/src/lib/libc/port/threads/pthr_barrier.c b/usr/src/lib/libc/port/threads/pthr_barrier.c
index 9d28323265..e57bb31ece 100644
--- a/usr/src/lib/libc/port/threads/pthr_barrier.c
+++ b/usr/src/lib/libc/port/threads/pthr_barrier.c
@@ -127,7 +127,7 @@ _pthread_barrier_destroy(pthread_barrier_t *barrier)
(void) __mutex_destroy(mp);
(void) _cond_destroy(cvp);
- (void) _private_memset(barrier, -1, sizeof (*barrier));
+ (void) memset(barrier, -1, sizeof (*barrier));
return (0);
}
diff --git a/usr/src/lib/libc/port/threads/pthr_mutex.c b/usr/src/lib/libc/port/threads/pthr_mutex.c
index b49d5fb3d0..d3f54c2c71 100644
--- a/usr/src/lib/libc/port/threads/pthr_mutex.c
+++ b/usr/src/lib/libc/port/threads/pthr_mutex.c
@@ -234,7 +234,7 @@ _pthread_mutex_init(pthread_mutex_t *mutex, pthread_mutexattr_t *attr)
PTHREAD_PRIO_NONE | PTHREAD_MUTEX_STALL_NP;
}
- return (_private_mutex_init((mutex_t *)mutex, type, &prioceiling));
+ return (mutex_init((mutex_t *)mutex, type, &prioceiling));
}
/*
diff --git a/usr/src/lib/libc/port/threads/pthread.c b/usr/src/lib/libc/port/threads/pthread.c
index a1fb7dcb46..83cc7ec37a 100644
--- a/usr/src/lib/libc/port/threads/pthread.c
+++ b/usr/src/lib/libc/port/threads/pthread.c
@@ -164,16 +164,15 @@ _pthread_once(pthread_once_t *once_control, void (*init_routine)(void))
return (EINVAL);
if (once->once_flag == PTHREAD_ONCE_NOTDONE) {
- (void) _private_mutex_lock(&once->mlock);
+ (void) mutex_lock(&once->mlock);
if (once->once_flag == PTHREAD_ONCE_NOTDONE) {
- pthread_cleanup_push(_private_mutex_unlock,
- &once->mlock);
+ pthread_cleanup_push(mutex_unlock, &once->mlock);
(*init_routine)();
pthread_cleanup_pop(0);
_membar_producer();
once->once_flag = PTHREAD_ONCE_DONE;
}
- (void) _private_mutex_unlock(&once->mlock);
+ (void) mutex_unlock(&once->mlock);
}
_membar_consumer();
diff --git a/usr/src/lib/libc/port/threads/rwlock.c b/usr/src/lib/libc/port/threads/rwlock.c
index 5770049bb1..7a8e70b223 100644
--- a/usr/src/lib/libc/port/threads/rwlock.c
+++ b/usr/src/lib/libc/port/threads/rwlock.c
@@ -104,7 +104,7 @@ rwl_entry(rwlock_t *rwlp)
* Reallocate the array, double the size each time.
*/
readlockp = lmalloc(nlocks * 2 * sizeof (readlock_t));
- (void) _memcpy(readlockp, self->ul_readlock.array,
+ (void) memcpy(readlockp, self->ul_readlock.array,
nlocks * sizeof (readlock_t));
lfree(self->ul_readlock.array, nlocks * sizeof (readlock_t));
self->ul_readlock.array = readlockp;
@@ -218,7 +218,7 @@ __rwlock_init(rwlock_t *rwlp, int type, void *arg)
sigoff(curthread);
rwl_entry(rwlp)->rd_count = 0;
sigon(curthread);
- (void) _memset(rwlp, 0, sizeof (*rwlp));
+ (void) memset(rwlp, 0, sizeof (*rwlp));
rwlp->rwlock_type = (uint16_t)type;
rwlp->rwlock_magic = RWL_MAGIC;
rwlp->mutex.mutex_type = (uint8_t)type;
@@ -419,7 +419,7 @@ rw_queue_release(queue_head_t *qp, rwlock_t *rwlp)
preempt(self);
}
if (lwpid != buffer)
- (void) _private_munmap(lwpid, maxlwps * sizeof (lwpid_t));
+ (void) munmap((caddr_t)lwpid, maxlwps * sizeof (lwpid_t));
return (nlwpid != 0);
}
@@ -455,16 +455,16 @@ shared_rwlock_lock(rwlock_t *rwlp, timespec_t *tsp, int rd_wr)
error = EBUSY;
break;
}
- if ((error = _private_mutex_lock(mp)) != 0)
+ if ((error = mutex_lock(mp)) != 0)
break;
if (rd_wr == READ_LOCK) {
if (read_lock_try(rwlp, 0)) {
- (void) _private_mutex_unlock(mp);
+ (void) mutex_unlock(mp);
break;
}
} else {
if (write_lock_try(rwlp, 0)) {
- (void) _private_mutex_unlock(mp);
+ (void) mutex_unlock(mp);
break;
}
}
@@ -1006,9 +1006,9 @@ __rw_unlock(rwlock_t *rwlp)
} else if (rd_wr == READ_LOCK && read_unlock_try(rwlp)) {
/* EMPTY */;
} else if (rwlp->rwlock_type == USYNC_PROCESS) {
- (void) _private_mutex_lock(&rwlp->mutex);
+ (void) mutex_lock(&rwlp->mutex);
(void) __lwp_rwlock_unlock(rwlp);
- (void) _private_mutex_unlock(&rwlp->mutex);
+ (void) mutex_unlock(&rwlp->mutex);
waked = 1;
} else {
qp = queue_lock(rwlp, MX);
@@ -1034,7 +1034,7 @@ out:
* the pending writer.
*/
if (waked)
- lwp_yield();
+ yield();
return (0);
}
diff --git a/usr/src/lib/libc/port/threads/scalls.c b/usr/src/lib/libc/port/threads/scalls.c
index 1f96e43a7d..e7eb606350 100644
--- a/usr/src/lib/libc/port/threads/scalls.c
+++ b/usr/src/lib/libc/port/threads/scalls.c
@@ -70,14 +70,14 @@ void
fork_lock_enter(void)
{
ASSERT(curthread->ul_critical == 0);
- (void) _private_mutex_lock(&curthread->ul_uberdata->fork_lock);
+ (void) mutex_lock(&curthread->ul_uberdata->fork_lock);
}
void
fork_lock_exit(void)
{
ASSERT(curthread->ul_critical == 0);
- (void) _private_mutex_unlock(&curthread->ul_uberdata->fork_lock);
+ (void) mutex_unlock(&curthread->ul_uberdata->fork_lock);
}
/*
@@ -100,10 +100,9 @@ callout_lock_exit(void)
cancel_safe_mutex_unlock(&curthread->ul_uberdata->callout_lock);
}
-#pragma weak forkx = _private_forkx
-#pragma weak _forkx = _private_forkx
+#pragma weak forkx = _forkx
pid_t
-_private_forkx(int flags)
+_forkx(int flags)
{
ulwp_t *self = curthread;
uberdata_t *udp = self->ul_uberdata;
@@ -122,7 +121,7 @@ _private_forkx(int flags)
}
pid = __forkx(flags);
if (pid == 0) { /* child */
- udp->pid = _private_getpid();
+ udp->pid = getpid();
self->ul_vfork = 0;
}
return (pid);
@@ -150,13 +149,13 @@ _private_forkx(int flags)
* functions are free to do anything they please (except they
* will not receive any signals).
*/
- (void) _private_mutex_lock(&udp->atfork_lock);
+ (void) mutex_lock(&udp->atfork_lock);
_prefork_handler();
/*
* Block every other thread attempting thr_suspend() or thr_continue().
*/
- (void) _private_mutex_lock(&udp->fork_lock);
+ (void) mutex_lock(&udp->fork_lock);
/*
* Block all signals.
@@ -187,22 +186,22 @@ _private_forkx(int flags)
self->ul_schedctl = NULL;
self->ul_cursig = 0;
self->ul_siginfo.si_signo = 0;
- udp->pid = _private_getpid();
+ udp->pid = getpid();
/* reset the library's data structures to reflect one thread */
unregister_locks();
postfork1_child();
restore_signals(self);
- (void) _private_mutex_unlock(&udp->fork_lock);
+ (void) mutex_unlock(&udp->fork_lock);
_postfork_child_handler();
} else {
/* restart all threads that were suspended for fork() */
continue_fork(0);
restore_signals(self);
- (void) _private_mutex_unlock(&udp->fork_lock);
+ (void) mutex_unlock(&udp->fork_lock);
_postfork_parent_handler();
}
- (void) _private_mutex_unlock(&udp->atfork_lock);
+ (void) mutex_unlock(&udp->atfork_lock);
self->ul_fork = 0;
sigon(self);
@@ -220,17 +219,16 @@ _private_forkx(int flags)
pid_t
_fork(void)
{
- return (_private_forkx(0));
+ return (_forkx(0));
}
/*
* Much of the logic here is the same as in forkx().
* See the comments in forkx(), above.
*/
-#pragma weak forkallx = _private_forkallx
-#pragma weak _forkallx = _private_forkallx
+#pragma weak forkallx = _forkallx
pid_t
-_private_forkallx(int flags)
+_forkallx(int flags)
{
ulwp_t *self = curthread;
uberdata_t *udp = self->ul_uberdata;
@@ -243,7 +241,7 @@ _private_forkallx(int flags)
}
pid = __forkallx(flags);
if (pid == 0) { /* child */
- udp->pid = _private_getpid();
+ udp->pid = getpid();
self->ul_vfork = 0;
}
return (pid);
@@ -256,8 +254,8 @@ _private_forkallx(int flags)
return (-1);
}
self->ul_fork = 1;
- (void) _private_mutex_lock(&udp->atfork_lock);
- (void) _private_mutex_lock(&udp->fork_lock);
+ (void) mutex_lock(&udp->atfork_lock);
+ (void) mutex_lock(&udp->fork_lock);
block_all_signals(self);
suspend_fork();
@@ -268,15 +266,15 @@ _private_forkallx(int flags)
self->ul_schedctl = NULL;
self->ul_cursig = 0;
self->ul_siginfo.si_signo = 0;
- udp->pid = _private_getpid();
+ udp->pid = getpid();
unregister_locks();
continue_fork(1);
} else {
continue_fork(0);
}
restore_signals(self);
- (void) _private_mutex_unlock(&udp->fork_lock);
- (void) _private_mutex_unlock(&udp->atfork_lock);
+ (void) mutex_unlock(&udp->fork_lock);
+ (void) mutex_unlock(&udp->atfork_lock);
self->ul_fork = 0;
sigon(self);
@@ -287,7 +285,7 @@ _private_forkallx(int flags)
pid_t
_forkall(void)
{
- return (_private_forkallx(0));
+ return (_forkallx(0));
}
/*
@@ -971,6 +969,11 @@ _sigtimedwait(const sigset_t *set, siginfo_t *infop, const timespec_t *timeout)
siginfo_t info;
int sig;
+ if (!primary_link_map) {
+ errno = ENOTSUP;
+ return (-1);
+ }
+
PROLOGUE
if (abort) {
*self->ul_errnop = EINTR;
@@ -986,7 +989,7 @@ _sigtimedwait(const sigset_t *set, siginfo_t *infop, const timespec_t *timeout)
}
EPILOGUE
if (sig != -1 && infop)
- (void) _private_memcpy(infop, &info, sizeof (*infop));
+ (void) memcpy(infop, &info, sizeof (*infop));
return (sig);
}
diff --git a/usr/src/lib/libc/port/threads/sema.c b/usr/src/lib/libc/port/threads/sema.c
index 1378facf49..4e58123bd7 100644
--- a/usr/src/lib/libc/port/threads/sema.c
+++ b/usr/src/lib/libc/port/threads/sema.c
@@ -51,7 +51,7 @@ _sema_init(sema_t *sp, unsigned int count, int type, void *arg)
if ((type != USYNC_THREAD && type != USYNC_PROCESS) ||
(count > _semvaluemax))
return (EINVAL);
- (void) _memset(sp, 0, sizeof (*sp));
+ (void) memset(sp, 0, sizeof (*sp));
sp->count = count;
sp->type = (uint16_t)type;
sp->magic = SEMA_MAGIC;
diff --git a/usr/src/lib/libc/port/threads/sigaction.c b/usr/src/lib/libc/port/threads/sigaction.c
index 838799d35e..c2b6f49fa9 100644
--- a/usr/src/lib/libc/port/threads/sigaction.c
+++ b/usr/src/lib/libc/port/threads/sigaction.c
@@ -31,9 +31,10 @@
#include "asyncio.h"
#include <signal.h>
#include <siginfo.h>
-#include <ucontext.h>
#include <sys/systm.h>
+extern int _setcontext(const ucontext_t *);
+
const sigset_t maskset = {MASKSET0, MASKSET1, 0, 0}; /* maskable signals */
/*
@@ -104,11 +105,11 @@ call_user_handler(int sig, siginfo_t *sip, ucontext_t *ucp)
((sig == SIGPROF && sip->si_code == PROF_SIG) ||
(sig == SIGEMT && sip->si_code == EMT_CPCOVF)))) {
/* we wish this assignment could be atomic */
- (void) _private_memcpy(&uact, (void *)sap, sizeof (uact));
+ (void) memcpy(&uact, (void *)sap, sizeof (uact));
} else {
rwlock_t *rwlp = &udp->siguaction[sig].sig_lock;
lrw_rdlock(rwlp);
- (void) _private_memcpy(&uact, (void *)sap, sizeof (uact));
+ (void) memcpy(&uact, (void *)sap, sizeof (uact));
if ((sig == SIGCANCEL || sig == SIGAIOCANCEL) &&
(sap->sa_flags & SA_RESETHAND))
sap->sa_sigaction = SIG_DFL;
@@ -141,7 +142,7 @@ call_user_handler(int sig, siginfo_t *sip, ucontext_t *ucp)
sigorset(&uact.sa_mask, &ucp->uc_sigmask);
}
if (!(uact.sa_flags & SA_NODEFER)) /* add current signal */
- (void) _private_sigaddset(&uact.sa_mask, sig);
+ (void) sigaddset(&uact.sa_mask, sig);
self->ul_sigmask = uact.sa_mask;
self->ul_siglink = ucp;
(void) __lwp_sigmask(SIG_SETMASK, &uact.sa_mask, NULL);
@@ -205,7 +206,7 @@ call_user_handler(int sig, siginfo_t *sip, ucontext_t *ucp)
#endif /* sparc */
out:
- (void) _private_setcontext(ucp);
+ (void) _setcontext(ucp);
thr_panic("call_user_handler(): _setcontext() returned");
}
@@ -310,7 +311,7 @@ sigacthandler(int sig, siginfo_t *sip, void *uvp)
ASSERT(self->ul_cursig == 0);
self->ul_cursig = (char)sig;
if (sip != NULL)
- (void) _private_memcpy(&self->ul_siginfo,
+ (void) memcpy(&self->ul_siginfo,
sip, sizeof (siginfo_t));
else
self->ul_siginfo.si_signo = 0;
@@ -330,14 +331,13 @@ sigacthandler(int sig, siginfo_t *sip, void *uvp)
* thread's ul_sigmask by this operation.
*/
ucp->uc_sigmask = maskset;
- (void) __setcontext_syscall(ucp);
+ (void) __setcontext(ucp);
thr_panic("sigacthandler(): __setcontext() returned");
}
-#pragma weak sigaction = _libc_sigaction
-#pragma weak _sigaction = _libc_sigaction
+#pragma weak sigaction = _sigaction
int
-_libc_sigaction(int sig, const struct sigaction *nact, struct sigaction *oact)
+_sigaction(int sig, const struct sigaction *nact, struct sigaction *oact)
{
ulwp_t *self = curthread;
uberdata_t *udp = self->ul_uberdata;
@@ -346,6 +346,11 @@ _libc_sigaction(int sig, const struct sigaction *nact, struct sigaction *oact)
struct sigaction *tactp = NULL;
int rv;
+ if (nact != NULL && !primary_link_map) {
+ errno = ENOTSUP;
+ return (-1);
+ }
+
if (sig <= 0 || sig >= NSIG) {
errno = EINVAL;
return (-1);
@@ -434,6 +439,9 @@ _libc_sigaction(int sig, const struct sigaction *nact, struct sigaction *oact)
return (rv);
}
+/*
+ * This is a private interface for the linux brand interface.
+ */
void
setsigacthandler(void (*nsigacthandler)(int, siginfo_t *, void *),
void (**osigacthandler)(int, siginfo_t *, void *))
@@ -473,7 +481,7 @@ block_all_signals(ulwp_t *self)
}
/*
- * _private_setcontext has code that forcibly restores the curthread
+ * setcontext() has code that forcibly restores the curthread
* pointer in a context passed to the setcontext(2) syscall.
*
* Certain processes may need to disable this feature, so these routines
@@ -491,10 +499,9 @@ set_setcontext_enforcement(int on)
setcontext_enforcement = on;
}
-#pragma weak setcontext = _private_setcontext
-#pragma weak _setcontext = _private_setcontext
+#pragma weak setcontext = _setcontext
int
-_private_setcontext(const ucontext_t *ucp)
+_setcontext(const ucontext_t *ucp)
{
ulwp_t *self = curthread;
int ret;
@@ -506,7 +513,7 @@ _private_setcontext(const ucontext_t *ucp)
*/
if (ucp == NULL)
_thr_exit(NULL);
- (void) _private_memcpy(&uc, ucp, sizeof (uc));
+ (void) memcpy(&uc, ucp, sizeof (uc));
/*
* Restore previous signal mask and context link.
@@ -553,7 +560,7 @@ _private_setcontext(const ucontext_t *ucp)
*/
set_parking_flag(self, 0);
self->ul_sp = 0;
- ret = __setcontext_syscall(&uc);
+ ret = __setcontext(&uc);
/*
* It is OK for setcontext() to return if the user has not specified
diff --git a/usr/src/lib/libc/port/threads/spawn.c b/usr/src/lib/libc/port/threads/spawn.c
index 5c0d505a24..cf28f44b99 100644
--- a/usr/src/lib/libc/port/threads/spawn.c
+++ b/usr/src/lib/libc/port/threads/spawn.c
@@ -67,20 +67,8 @@ typedef struct file_attr {
extern pid_t _vforkx(int);
#pragma unknown_control_flow(_vforkx)
-extern void *_private_memset(void *, int, size_t);
extern int __lwp_sigmask(int, const sigset_t *, sigset_t *);
extern int __sigaction(int, const struct sigaction *, struct sigaction *);
-extern int _private_close(int);
-extern int _private_execve(const char *, char *const *, char *const *);
-extern int _private_fcntl(int, int, intptr_t);
-extern int _private_setgid(gid_t);
-extern int _private_setpgid(pid_t, pid_t);
-extern int _private_setuid(uid_t);
-extern int _private_sigismember(sigset_t *, int);
-extern gid_t _private_getgid(void);
-extern uid_t _private_getuid(void);
-extern uid_t _private_geteuid(void);
-extern void _private_exit(int);
static int
perform_flag_actions(spawn_attr_t *sap)
@@ -94,21 +82,20 @@ perform_flag_actions(spawn_attr_t *sap)
if (sap->sa_psflags & POSIX_SPAWN_SETSIGDEF) {
struct sigaction sigdfl;
- (void) _private_memset(&sigdfl, 0, sizeof (sigdfl));
+ (void) memset(&sigdfl, 0, sizeof (sigdfl));
for (sig = 1; sig < NSIG; sig++) {
- if (_private_sigismember(&sap->sa_sigdefault, sig))
+ if (sigismember(&sap->sa_sigdefault, sig))
(void) __sigaction(sig, &sigdfl, NULL);
}
}
if (sap->sa_psflags & POSIX_SPAWN_RESETIDS) {
- if (_private_setgid(_private_getgid()) != 0 ||
- _private_setuid(_private_getuid()) != 0)
+ if (setgid(getgid()) != 0 || setuid(getuid()) != 0)
return (errno);
}
if (sap->sa_psflags & POSIX_SPAWN_SETPGROUP) {
- if (_private_setpgid(0, sap->sa_pgroup) != 0)
+ if (setpgid(0, sap->sa_pgroup) != 0)
return (errno);
}
@@ -133,23 +120,22 @@ perform_file_actions(file_attr_t *fap)
do {
switch (fap->fa_type) {
case FA_OPEN:
- fd = _private_open(fap->fa_path,
+ fd = __open(fap->fa_path,
fap->fa_oflag, fap->fa_mode);
if (fd < 0)
return (errno);
if (fd != fap->fa_filedes) {
- if (_private_fcntl(fd, F_DUP2FD,
- fap->fa_filedes) < 0)
+ if (__fcntl(fd, F_DUP2FD, fap->fa_filedes) < 0)
return (errno);
- (void) _private_close(fd);
+ (void) __close(fd);
}
break;
case FA_CLOSE:
- if (_private_close(fap->fa_filedes) == -1)
+ if (__close(fap->fa_filedes) == -1)
return (errno);
break;
case FA_DUP2:
- fd = _private_fcntl(fap->fa_filedes, F_DUP2FD,
+ fd = __fcntl(fap->fa_filedes, F_DUP2FD,
fap->fa_newfiledes);
if (fd < 0)
return (errno);
@@ -237,16 +223,16 @@ _posix_spawn(
if (sap != NULL)
if (set_error(&error, perform_flag_actions(sap)) != 0)
- _private_exit(_EVAPORATE);
+ _exit(_EVAPORATE);
if (fap != NULL)
if (set_error(&error, perform_file_actions(fap)) != 0)
- _private_exit(_EVAPORATE);
+ _exit(_EVAPORATE);
(void) set_error(&error, 0);
- (void) _private_execve(path, argv, envp);
+ (void) execve(path, argv, envp);
(void) set_error(&error, errno);
- _private_exit(_EVAPORATE);
+ _exit(_EVAPORATE);
return (0); /* not reached */
}
@@ -339,11 +325,11 @@ _posix_spawnp(
if (sap != NULL)
if (set_error(&error, perform_flag_actions(sap)) != 0)
- _private_exit(_EVAPORATE);
+ _exit(_EVAPORATE);
if (fap != NULL)
if (set_error(&error, perform_file_actions(fap)) != 0)
- _private_exit(_EVAPORATE);
+ _exit(_EVAPORATE);
if (pathstr == NULL) {
/*
@@ -355,7 +341,7 @@ _posix_spawnp(
* contain '/', the last call to execat() will result in an
* attempt to execv file from the current directory.
*/
- if (_private_geteuid() == 0 || _private_getuid() == 0) {
+ if (geteuid() == 0 || getuid() == 0) {
if (!xpg4)
pathstr = "/usr/sbin:/usr/ccs/bin:/usr/bin";
else
@@ -389,20 +375,20 @@ _posix_spawnp(
path[1] = '/';
}
(void) set_error(&error, 0);
- (void) _private_execve(path, argv, envp);
+ (void) execve(path, argv, envp);
if (set_error(&error, errno) == ENOEXEC) {
newargs[0] = (char *)shell;
newargs[1] = path;
for (i = 1; i <= argc; i++)
newargs[i + 1] = argv[i];
(void) set_error(&error, 0);
- (void) _private_execve(xpg4? xpg4_path : sun_path,
+ (void) execve(xpg4? xpg4_path : sun_path,
newargs, envp);
(void) set_error(&error, errno);
- _private_exit(_EVAPORATE);
+ _exit(_EVAPORATE);
}
} while (cp);
- _private_exit(_EVAPORATE);
+ _exit(_EVAPORATE);
return (0); /* not reached */
}
diff --git a/usr/src/lib/libc/port/threads/synch.c b/usr/src/lib/libc/port/threads/synch.c
index 626252671a..7bc1347e9a 100644
--- a/usr/src/lib/libc/port/threads/synch.c
+++ b/usr/src/lib/libc/port/threads/synch.c
@@ -125,7 +125,6 @@ int thread_queue_spin = 10000;
* LOCK_PRIO_PROTECT
* LOCK_ROBUST
*/
-#pragma weak _private_mutex_init = __mutex_init
#pragma weak mutex_init = __mutex_init
#pragma weak _mutex_init = __mutex_init
/* ARGSUSED2 */
@@ -185,7 +184,7 @@ __mutex_init(mutex_t *mp, int type, void *arg)
if (basetype == USYNC_PROCESS)
register_lock(mp);
} else {
- (void) _memset(mp, 0, sizeof (*mp));
+ (void) memset(mp, 0, sizeof (*mp));
mp->mutex_type = (uint8_t)type;
mp->mutex_flag = LOCK_INITED;
mp->mutex_magic = MUTEX_MAGIC;
@@ -250,7 +249,7 @@ set_rt_priority(ulwp_t *self, int prio)
pcparm.pc_cid = self->ul_rtclassid;
((rtparms_t *)pcparm.pc_clparms)->rt_tqnsecs = RT_NOCHANGE;
((rtparms_t *)pcparm.pc_clparms)->rt_pri = prio;
- (void) _private_priocntl(P_LWPID, self->ul_lwpid, PC_SETPARMS, &pcparm);
+ (void) priocntl(P_LWPID, self->ul_lwpid, PC_SETPARMS, &pcparm);
}
/*
@@ -455,7 +454,7 @@ queue_alloc(void)
*/
ASSERT(self == udp->ulwp_one);
ASSERT(!udp->uberflags.uf_mt);
- if ((data = _private_mmap(NULL, 2 * QHASHSIZE * sizeof (queue_head_t),
+ if ((data = mmap(NULL, 2 * QHASHSIZE * sizeof (queue_head_t),
PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, (off_t)0))
== MAP_FAILED)
thr_panic("cannot allocate thread queue_head table");
@@ -1181,14 +1180,14 @@ preempt(ulwp_t *self)
scp->sc_preemptctl.sc_nopreempt = self->ul_savpreempt;
if (scp->sc_preemptctl.sc_yield &&
scp->sc_preemptctl.sc_nopreempt == 0) {
- lwp_yield();
+ yield();
if (scp->sc_preemptctl.sc_yield) {
/*
* Shouldn't happen. This is either
* a race condition or the thread
* just entered the real-time class.
*/
- lwp_yield();
+ yield();
scp->sc_preemptctl.sc_yield = 0;
}
}
@@ -1635,7 +1634,7 @@ mutex_wakeup_all(mutex_t *mp)
}
if (lwpid != buffer)
- (void) _private_munmap(lwpid, maxlwps * sizeof (lwpid_t));
+ (void) munmap((caddr_t)lwpid, maxlwps * sizeof (lwpid_t));
}
/*
@@ -2167,18 +2166,6 @@ mutex_lock_impl(mutex_t *mp, timespec_t *tsp)
return (mutex_lock_internal(mp, tsp, MUTEX_LOCK));
}
-/*
- * Of the following function names (all the same function, of course),
- * only _private_mutex_lock() is not exported from libc. This means
- * that calling _private_mutex_lock() within libc will not invoke the
- * dynamic linker. This is critical for any code called in the child
- * of vfork() (via posix_spawn()) because invoking the dynamic linker
- * in such a case would corrupt the parent's address space. There are
- * other places in libc where avoiding the dynamic linker is necessary.
- * Of course, _private_mutex_lock() can be called in cases not requiring
- * the avoidance of the dynamic linker too, and often is.
- */
-#pragma weak _private_mutex_lock = __mutex_lock
#pragma weak mutex_lock = __mutex_lock
#pragma weak _mutex_lock = __mutex_lock
#pragma weak pthread_mutex_lock = __mutex_lock
@@ -2220,7 +2207,6 @@ _pthread_mutex_reltimedlock_np(mutex_t *mp, const timespec_t *reltime)
return (error);
}
-#pragma weak _private_mutex_trylock = __mutex_trylock
#pragma weak mutex_trylock = __mutex_trylock
#pragma weak _mutex_trylock = __mutex_trylock
#pragma weak pthread_mutex_trylock = __mutex_trylock
@@ -2347,7 +2333,6 @@ mutex_unlock_internal(mutex_t *mp, int retain_robust_flags)
return (error);
}
-#pragma weak _private_mutex_unlock = __mutex_unlock
#pragma weak mutex_unlock = __mutex_unlock
#pragma weak _mutex_unlock = __mutex_unlock
#pragma weak pthread_mutex_unlock = __mutex_unlock
@@ -2537,13 +2522,13 @@ void
sig_mutex_lock(mutex_t *mp)
{
sigoff(curthread);
- (void) _private_mutex_lock(mp);
+ (void) mutex_lock(mp);
}
void
sig_mutex_unlock(mutex_t *mp)
{
- (void) _private_mutex_unlock(mp);
+ (void) mutex_unlock(mp);
sigon(curthread);
}
@@ -2553,7 +2538,7 @@ sig_mutex_trylock(mutex_t *mp)
int error;
sigoff(curthread);
- if ((error = _private_mutex_trylock(mp)) != 0)
+ if ((error = mutex_trylock(mp)) != 0)
sigon(curthread);
return (error);
}
@@ -2567,14 +2552,14 @@ sig_cond_wait(cond_t *cv, mutex_t *mp)
int error;
ASSERT(curthread->ul_sigdefer != 0);
- _private_testcancel();
+ pthread_testcancel();
error = __cond_wait(cv, mp);
if (error == EINTR && curthread->ul_cursig) {
sig_mutex_unlock(mp);
/* take the deferred signal here */
sig_mutex_lock(mp);
}
- _private_testcancel();
+ pthread_testcancel();
return (error);
}
@@ -2587,14 +2572,14 @@ sig_cond_reltimedwait(cond_t *cv, mutex_t *mp, const timespec_t *ts)
int error;
ASSERT(curthread->ul_sigdefer != 0);
- _private_testcancel();
+ pthread_testcancel();
error = __cond_reltimedwait(cv, mp, ts);
if (error == EINTR && curthread->ul_cursig) {
sig_mutex_unlock(mp);
/* take the deferred signal here */
sig_mutex_lock(mp);
}
- _private_testcancel();
+ pthread_testcancel();
return (error);
}
@@ -2607,7 +2592,7 @@ sig_cond_reltimedwait(cond_t *cv, mutex_t *mp, const timespec_t *ts)
void
cancel_safe_mutex_lock(mutex_t *mp)
{
- (void) _private_mutex_lock(mp);
+ (void) mutex_lock(mp);
curthread->ul_libc_locks++;
}
@@ -2616,7 +2601,7 @@ cancel_safe_mutex_trylock(mutex_t *mp)
{
int error;
- if ((error = _private_mutex_trylock(mp)) == 0)
+ if ((error = mutex_trylock(mp)) == 0)
curthread->ul_libc_locks++;
return (error);
}
@@ -2628,7 +2613,7 @@ cancel_safe_mutex_unlock(mutex_t *mp)
ASSERT(self->ul_libc_locks != 0);
- (void) _private_mutex_unlock(mp);
+ (void) mutex_unlock(mp);
/*
* Decrement the count of locks held by cancel_safe_mutex_lock().
@@ -2687,7 +2672,6 @@ mutex_is_held(mutex_t *mparg)
return (MUTEX_OWNED(mp, curthread));
}
-#pragma weak _private_mutex_destroy = __mutex_destroy
#pragma weak mutex_destroy = __mutex_destroy
#pragma weak _mutex_destroy = __mutex_destroy
#pragma weak pthread_mutex_destroy = __mutex_destroy
@@ -2697,7 +2681,7 @@ __mutex_destroy(mutex_t *mp)
{
if (mp->mutex_type & USYNC_PROCESS)
forget_lock(mp);
- (void) _memset(mp, 0, sizeof (*mp));
+ (void) memset(mp, 0, sizeof (*mp));
tdb_sync_obj_deregister(mp);
return (0);
}
@@ -2735,7 +2719,7 @@ _pthread_spin_init(pthread_spinlock_t *lock, int pshared)
{
mutex_t *mp = (mutex_t *)lock;
- (void) _memset(mp, 0, sizeof (*mp));
+ (void) memset(mp, 0, sizeof (*mp));
if (pshared == PTHREAD_PROCESS_SHARED)
mp->mutex_type = USYNC_PROCESS;
else
@@ -2749,7 +2733,7 @@ _pthread_spin_init(pthread_spinlock_t *lock, int pshared)
int
_pthread_spin_destroy(pthread_spinlock_t *lock)
{
- (void) _memset(lock, 0, sizeof (*lock));
+ (void) memset(lock, 0, sizeof (*lock));
return (0);
}
@@ -2886,7 +2870,7 @@ find_lock_entry(mutex_t *lock)
* Reallocate the array, double the size each time.
*/
lockptr = lmalloc(nlocks * 2 * sizeof (mutex_t *));
- (void) _memcpy(lockptr, self->ul_heldlocks.array,
+ (void) memcpy(lockptr, self->ul_heldlocks.array,
nlocks * sizeof (mutex_t *));
lfree(self->ul_heldlocks.array, nlocks * sizeof (mutex_t *));
self->ul_heldlocks.array = lockptr;
@@ -2978,7 +2962,7 @@ _cond_init(cond_t *cvp, int type, void *arg)
{
if (type != USYNC_THREAD && type != USYNC_PROCESS)
return (EINVAL);
- (void) _memset(cvp, 0, sizeof (*cvp));
+ (void) memset(cvp, 0, sizeof (*cvp));
cvp->cond_type = (uint16_t)type;
cvp->cond_magic = COND_MAGIC;
return (0);
@@ -3594,7 +3578,7 @@ alloc_lwpids(lwpid_t *lwpid, int *nlwpid_ptr, int *maxlwps_ptr)
first_allocation = (maxlwps == MAXLWPS);
newlwps = first_allocation? NEWLWPS : 2 * maxlwps;
- vaddr = _private_mmap(NULL, newlwps * sizeof (lwpid_t),
+ vaddr = mmap(NULL, newlwps * sizeof (lwpid_t),
PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, (off_t)0);
if (vaddr == MAP_FAILED) {
@@ -3606,9 +3590,9 @@ alloc_lwpids(lwpid_t *lwpid, int *nlwpid_ptr, int *maxlwps_ptr)
(void) __lwp_unpark_all(lwpid, nlwpid);
*nlwpid_ptr = 0;
} else {
- (void) _memcpy(vaddr, lwpid, maxlwps * sizeof (lwpid_t));
+ (void) memcpy(vaddr, lwpid, maxlwps * sizeof (lwpid_t));
if (!first_allocation)
- (void) _private_munmap(lwpid,
+ (void) munmap((caddr_t)lwpid,
maxlwps * sizeof (lwpid_t));
lwpid = vaddr;
*maxlwps_ptr = newlwps;
@@ -3711,7 +3695,7 @@ cond_broadcast_internal(cond_t *cvp)
preempt(self);
}
if (lwpid != buffer)
- (void) _private_munmap(lwpid, maxlwps * sizeof (lwpid_t));
+ (void) munmap((caddr_t)lwpid, maxlwps * sizeof (lwpid_t));
return (error);
}
diff --git a/usr/src/lib/libc/port/threads/tdb_agent.c b/usr/src/lib/libc/port/threads/tdb_agent.c
index bd9d7cf187..519fd4e439 100644
--- a/usr/src/lib/libc/port/threads/tdb_agent.c
+++ b/usr/src/lib/libc/port/threads/tdb_agent.c
@@ -20,7 +20,7 @@
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -142,7 +142,7 @@ alloc_sync_addr(void *addr)
/* double the allocation each time */
tdbp->tdb_sync_alloc *= 2;
- if ((vaddr = _private_mmap(NULL,
+ if ((vaddr = mmap(NULL,
tdbp->tdb_sync_alloc * sizeof (tdb_sync_stats_t),
PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON,
-1, (off_t)0)) == MAP_FAILED) {
@@ -161,7 +161,7 @@ alloc_sync_addr(void *addr)
tdbp->tdb_sync_addr_free = (tdb_sync_stats_t *)(uintptr_t)sap->next;
sap->next = (uintptr_t)0;
sap->sync_addr = (uintptr_t)addr;
- (void) _memset(&sap->un, 0, sizeof (sap->un));
+ (void) memset(&sap->un, 0, sizeof (sap->un));
return (sap);
}
@@ -193,8 +193,7 @@ initialize_sync_hash()
}
/* start with a free list of 2k elements */
tdbp->tdb_sync_alloc = 2*1024;
- if ((vaddr = _private_mmap(NULL,
- TDB_HASH_SIZE * sizeof (uint64_t) +
+ if ((vaddr = mmap(NULL, TDB_HASH_SIZE * sizeof (uint64_t) +
tdbp->tdb_sync_alloc * sizeof (tdb_sync_stats_t),
PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON,
-1, (off_t)0)) == MAP_FAILED) {
@@ -205,7 +204,7 @@ initialize_sync_hash()
/* initialize the free list */
tdbp->tdb_sync_addr_free = sap =
- (tdb_sync_stats_t *)&addr_hash[TDB_HASH_SIZE];
+ (tdb_sync_stats_t *)&addr_hash[TDB_HASH_SIZE];
for (i = 1; i < tdbp->tdb_sync_alloc; sap++, i++)
sap->next = (uintptr_t)(sap + 1);
sap->next = (uintptr_t)0;
@@ -215,7 +214,7 @@ initialize_sync_hash()
udp->tdb_hash_lock_stats.next = (uintptr_t)0;
udp->tdb_hash_lock_stats.sync_addr = (uintptr_t)&udp->tdb_hash_lock;
addr_hash[tdb_addr_hash(&udp->tdb_hash_lock)] =
- (uintptr_t)&udp->tdb_hash_lock_stats;
+ (uintptr_t)&udp->tdb_hash_lock_stats;
tdbp->tdb_register_count = 1;
/* assign to tdb_sync_addr_hash only after fully initialized */
@@ -308,7 +307,7 @@ tdb_sync_obj_register(void *addr, int *new)
(uintptr_t)tdbp->tdb_sync_addr_hash[i];
sap != NULL;
sap = (tdb_sync_stats_t *)(uintptr_t)sap->next)
- (void) _memset(&sap->un, 0, sizeof (sap->un));
+ (void) memset(&sap->un, 0, sizeof (sap->un));
switch (udp->uberflags.uf_tdb_register_sync) {
case REGISTER_SYNC_ENABLE:
diff --git a/usr/src/lib/libc/port/threads/thr.c b/usr/src/lib/libc/port/threads/thr.c
index 4f0a840269..17625cb61c 100644
--- a/usr/src/lib/libc/port/threads/thr.c
+++ b/usr/src/lib/libc/port/threads/thr.c
@@ -76,6 +76,7 @@ extern const Lc_interface rtld_funcs[];
#pragma weak _uberdata = __uberdata
uberdata_t __uberdata = {
{ DEFAULTMUTEX, NULL, 0 }, /* link_lock */
+ { RECURSIVEMUTEX, NULL, 0 }, /* ld_lock */
{ RECURSIVEMUTEX, NULL, 0 }, /* fork_lock */
{ RECURSIVEMUTEX, NULL, 0 }, /* atfork_lock */
{ RECURSIVEMUTEX, NULL, 0 }, /* callout_lock */
@@ -219,7 +220,7 @@ ulwp_clean(ulwp_t *ulwp)
uintptr_t stktop = ulwp->ul_stktop;
size_t stksiz = ulwp->ul_stksiz;
- (void) _private_memset(ulwp, 0, sizeof (*ulwp));
+ (void) memset(ulwp, 0, sizeof (*ulwp));
ulwp->ul_stk = stk;
ulwp->ul_mapsiz = mapsiz;
@@ -270,7 +271,7 @@ trim_stack_cache(int cache_limit)
udp->lwp_laststack = prev;
hash_out(ulwp, udp);
udp->nfreestack--;
- (void) _private_munmap(ulwp->ul_stk, ulwp->ul_mapsiz);
+ (void) munmap(ulwp->ul_stk, ulwp->ul_mapsiz);
/*
* Now put the free ulwp on the ulwp freelist.
*/
@@ -377,14 +378,14 @@ find_stack(size_t stksize, size_t guardsize)
/*
* Create a new stack.
*/
- if ((stk = _private_mmap(NULL, mapsize, stackprot,
+ if ((stk = mmap(NULL, mapsize, stackprot,
MAP_PRIVATE|MAP_NORESERVE|MAP_ANON, -1, (off_t)0)) != MAP_FAILED) {
/*
* We have allocated our stack. Now allocate the ulwp.
*/
ulwp = ulwp_alloc();
if (ulwp == NULL)
- (void) _private_munmap(stk, mapsize);
+ (void) munmap(stk, mapsize);
else {
ulwp->ul_stk = stk;
ulwp->ul_mapsiz = mapsize;
@@ -393,8 +394,7 @@ find_stack(size_t stksize, size_t guardsize)
ulwp->ul_stksiz = stksize;
ulwp->ul_ix = -1;
if (guardsize) /* protect the extra red zone */
- (void) _private_mprotect(stk,
- guardsize, PROT_NONE);
+ (void) mprotect(stk, guardsize, PROT_NONE);
}
}
return (ulwp);
@@ -802,7 +802,7 @@ _thrp_exit()
self->ul_pleasestop = 0;
if (replace != NULL) {
int ix = self->ul_ix; /* the hash index */
- (void) _private_memcpy(replace, self, REPLACEMENT_SIZE);
+ (void) memcpy(replace, self, REPLACEMENT_SIZE);
replace->ul_self = replace;
replace->ul_next = NULL; /* clone not on stack list */
replace->ul_mapsiz = 0; /* allows clone to be freed */
@@ -1270,7 +1270,7 @@ libc_init(void)
* This is also convenient to use for getting our signal mask.
*/
uc.uc_flags = UC_ALL;
- (void) __getcontext_syscall(&uc);
+ (void) __getcontext(&uc);
ASSERT(uc.uc_link == NULL);
tls_size = roundup64(udp->tls_metadata.static_tls.tls_size);
@@ -1307,7 +1307,7 @@ libc_init(void)
#endif
self->ul_stktop = (uintptr_t)uc.uc_stack.ss_sp + uc.uc_stack.ss_size;
- (void) _private_getrlimit(RLIMIT_STACK, &rl);
+ (void) getrlimit(RLIMIT_STACK, &rl);
self->ul_stksiz = rl.rlim_cur;
self->ul_stk = (caddr_t)(self->ul_stktop - self->ul_stksiz);
@@ -1340,8 +1340,7 @@ libc_init(void)
* external functions until we establish curthread, below,
* so we just call our private version of memcpy().
*/
- (void) _private_memcpy(udp,
- oldself->ul_uberdata, sizeof (*udp));
+ (void) memcpy(udp, oldself->ul_uberdata, sizeof (*udp));
/*
* These items point to global data on the primary link map.
*/
@@ -1356,7 +1355,7 @@ libc_init(void)
}
udp->all_lwps = self;
udp->ulwp_one = self;
- udp->pid = _private_getpid();
+ udp->pid = getpid();
udp->nthreads = 1;
/*
* In every link map, tdb_bootstrap points to the same piece of
@@ -1415,7 +1414,7 @@ libc_init(void)
self->ul_ustack.ss_size = self->ul_stksiz;
}
self->ul_ustack.ss_flags = 0;
- (void) _private_setustack(&self->ul_ustack);
+ (void) setustack(&self->ul_ustack);
/*
* Get the variables that affect thread behavior from the environment.
@@ -1532,7 +1531,7 @@ finish_init()
/*
* Now allocate the thread hash table.
*/
- if ((data = _private_mmap(NULL, HASHTBLSZ * sizeof (thr_hash_table_t),
+ if ((data = mmap(NULL, HASHTBLSZ * sizeof (thr_hash_table_t),
PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, (off_t)0))
== MAP_FAILED)
thr_panic("cannot allocate thread hash table");
@@ -1608,16 +1607,16 @@ postfork1_child()
hash_in_unlocked(self, TIDHASH(self->ul_lwpid, udp), udp);
/*
- * Some thread in the parent might have been suspended while
- * holding udp->callout_lock. Reinitialize the child's copy.
+ * Some thread in the parent might have been suspended
+ * while holding udp->callout_lock or udp->ld_lock.
+ * Reinitialize the child's copies.
*/
- _private_mutex_init(&udp->callout_lock,
- USYNC_THREAD | LOCK_RECURSIVE, NULL);
+ mutex_init(&udp->callout_lock, USYNC_THREAD | LOCK_RECURSIVE, NULL);
+ mutex_init(&udp->ld_lock, USYNC_THREAD | LOCK_RECURSIVE, NULL);
/* no one in the child is on a sleep queue; reinitialize */
if ((qp = udp->queue_head) != NULL) {
- (void) _private_memset(qp, 0,
- 2 * QHASHSIZE * sizeof (queue_head_t));
+ (void) memset(qp, 0, 2 * QHASHSIZE * sizeof (queue_head_t));
for (i = 0; i < 2 * QHASHSIZE; qp++, i++) {
qp->qh_type = (i < QHASHSIZE)? MX : CV;
qp->qh_lock.mutex_flag = LOCK_INITED;
@@ -2118,7 +2117,7 @@ _thr_continue(thread_t tid)
void
_thr_yield()
{
- lwp_yield();
+ yield();
}
#pragma weak thr_kill = _thr_kill
@@ -2190,12 +2189,19 @@ do_exit_critical()
* or forking allowed), and to be immune from cancellation for the duration.
*/
int
-_ti_bind_guard(int bindflag)
+_ti_bind_guard(int flags)
{
ulwp_t *self = curthread;
+ uberdata_t *udp = self->ul_uberdata;
+ int bindflag = (flags & THR_FLG_RTLD);
if ((self->ul_bindflags & bindflag) == bindflag)
return (0);
+ if ((flags & (THR_FLG_NOLOCK | THR_FLG_REENTER)) == THR_FLG_NOLOCK) {
+ ASSERT(self->ul_critical == 0);
+ sigoff(self); /* see no signals while holding ld_lock */
+ mutex_lock(&udp->ld_lock);
+ }
enter_critical(self);
self->ul_save_state = self->ul_cancel_disabled;
self->ul_cancel_disabled = 1;
@@ -2205,9 +2211,11 @@ _ti_bind_guard(int bindflag)
}
int
-_ti_bind_clear(int bindflag)
+_ti_bind_clear(int flags)
{
ulwp_t *self = curthread;
+ uberdata_t *udp = self->ul_uberdata;
+ int bindflag = (flags & THR_FLG_RTLD);
if ((self->ul_bindflags & bindflag) == 0)
return (self->ul_bindflags);
@@ -2215,6 +2223,13 @@ _ti_bind_clear(int bindflag)
self->ul_cancel_disabled = self->ul_save_state;
set_cancel_pending_flag(self, 0);
exit_critical(self);
+ if ((flags & (THR_FLG_NOLOCK | THR_FLG_REENTER)) == THR_FLG_NOLOCK) {
+ ASSERT(self->ul_critical == 0);
+ if (MUTEX_OWNED(&udp->ld_lock, self)) {
+ mutex_unlock(&udp->ld_lock);
+ sigon(self); /* reenable signals */
+ }
+ }
return (self->ul_bindflags);
}
@@ -2422,15 +2437,15 @@ getlwpstatus(thread_t tid, struct lwpstatus *sp)
(void) strcpy(buf, "/proc/self/lwp/");
ultos((uint64_t)tid, 10, buf + strlen(buf));
(void) strcat(buf, "/lwpstatus");
- if ((fd = _private_open(buf, O_RDONLY, 0)) >= 0) {
+ if ((fd = __open(buf, O_RDONLY, 0)) >= 0) {
while (__pread(fd, sp, sizeof (*sp), 0) == sizeof (*sp)) {
if (sp->pr_flags & PR_STOPPED) {
- (void) _private_close(fd);
+ (void) __close(fd);
return (0);
}
- lwp_yield(); /* give him a chance to stop */
+ yield(); /* give him a chance to stop */
}
- (void) _private_close(fd);
+ (void) __close(fd);
}
return (-1);
}
@@ -2449,7 +2464,7 @@ putlwpregs(thread_t tid, prgregset_t prp)
(void) strcpy(buf, "/proc/self/lwp/");
ultos((uint64_t)tid, 10, buf + strlen(buf));
(void) strcat(buf, "/lwpctl");
- if ((fd = _private_open(buf, O_WRONLY, 0)) >= 0) {
+ if ((fd = __open(buf, O_WRONLY, 0)) >= 0) {
dstop_sreg[0] = PCDSTOP; /* direct it to stop */
dstop_sreg[1] = PCSREG; /* set the registers */
iov[0].iov_base = (caddr_t)dstop_sreg;
@@ -2461,10 +2476,10 @@ putlwpregs(thread_t tid, prgregset_t prp)
iov[2].iov_base = (caddr_t)run_null;
iov[2].iov_len = sizeof (run_null);
if (__writev(fd, iov, 3) >= 0) {
- (void) _private_close(fd);
+ (void) __close(fd);
return (0);
}
- (void) _private_close(fd);
+ (void) __close(fd);
}
return (-1);
}
diff --git a/usr/src/lib/libc/port/threads/tls.c b/usr/src/lib/libc/port/threads/tls.c
index 30e185c9da..5225f11205 100644
--- a/usr/src/lib/libc/port/threads/tls.c
+++ b/usr/src/lib/libc/port/threads/tls.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -32,9 +32,11 @@
#define MIN_MOD_SLOTS 16
/*
- * To inform libc_init that we are on the primary link map.
+ * Used to inform libc_init() that we are on the primary link map,
+ * and to cause certain functions (like malloc() and sbrk()) to fail
+ * (with ENOTSUP) when they are called on an alternate link map.
*/
-int primary_link_map;
+int primary_link_map = 0;
#if defined(_LP64)
#define ALIGN 16
@@ -62,10 +64,10 @@ tls_modinfo_alloc(tls_metadata_t *tlsm, ulong_t moduleid)
mod_slots *= 2;
modinfo = lmalloc(mod_slots * sizeof (TLS_modinfo));
if (tls_modinfo->tls_data != NULL) {
- (void) _private_memcpy(modinfo, tls_modinfo->tls_data,
- tls_modinfo->tls_size * sizeof (TLS_modinfo));
+ (void) memcpy(modinfo, tls_modinfo->tls_data,
+ tls_modinfo->tls_size * sizeof (TLS_modinfo));
lfree(tls_modinfo->tls_data,
- tls_modinfo->tls_size * sizeof (TLS_modinfo));
+ tls_modinfo->tls_size * sizeof (TLS_modinfo));
}
tls_modinfo->tls_data = modinfo;
tls_modinfo->tls_size = mod_slots;
@@ -106,7 +108,7 @@ __tls_static_mods(TLS_modinfo **tlslist, unsigned long statictlssize)
*/
tlsm = &__uberdata.tls_metadata;
if (oldself != NULL) {
- (void) _private_memcpy(tlsm,
+ (void) memcpy(tlsm,
&oldself->ul_uberdata->tls_metadata, sizeof (*tlsm));
ASSERT(tlsm->static_tls.tls_data == NULL);
}
@@ -135,8 +137,8 @@ __tls_static_mods(TLS_modinfo **tlslist, unsigned long statictlssize)
ASSERT(tlsp->tm_filesz <= tlsp->tm_memsz);
ASSERT(tlsp->tm_memsz <= tlsp->tm_stattlsoffset);
if (tlsp->tm_filesz)
- (void) _private_memcpy(data_end-tlsp->tm_stattlsoffset,
- tlsp->tm_tlsblock, tlsp->tm_filesz);
+ (void) memcpy(data_end-tlsp->tm_stattlsoffset,
+ tlsp->tm_tlsblock, tlsp->tm_filesz);
if (max_modid < tlsp->tm_modid)
max_modid = tlsp->tm_modid;
}
@@ -145,7 +147,7 @@ __tls_static_mods(TLS_modinfo **tlslist, unsigned long statictlssize)
*/
modinfo = tls_modinfo_alloc(tlsm, max_modid);
for (tlspp = tlslist; (tlsp = *tlspp) != NULL; tlspp++)
- (void) _private_memcpy(&modinfo[tlsp->tm_modid],
+ (void) memcpy(&modinfo[tlsp->tm_modid],
tlsp, sizeof (*tlsp));
/*
@@ -153,7 +155,7 @@ __tls_static_mods(TLS_modinfo **tlslist, unsigned long statictlssize)
* since it will be copied up again in libc_init().
*/
if (oldself != NULL)
- (void) _private_memcpy(&oldself->ul_uberdata->tls_metadata,
+ (void) memcpy(&oldself->ul_uberdata->tls_metadata,
tlsm, sizeof (*tlsm));
}
@@ -173,7 +175,7 @@ __tls_mod_add(TLS_modinfo *tlsp)
ASSERT(!(tlsp->tm_flags & TM_FLG_STATICTLS));
ASSERT(tlsp->tm_filesz <= tlsp->tm_memsz);
modinfo = tls_modinfo_alloc(tlsm, moduleid);
- (void) _private_memcpy(&modinfo[moduleid], tlsp, sizeof (*tlsp));
+ (void) memcpy(&modinfo[moduleid], tlsp, sizeof (*tlsp));
lmutex_unlock(&tlsm->tls_lock);
}
@@ -191,7 +193,7 @@ __tls_mod_remove(TLS_modinfo *tlsp)
ASSERT(tlsm->tls_modinfo.tls_data != NULL &&
moduleid < tlsm->tls_modinfo.tls_size);
modinfo = tlsm->tls_modinfo.tls_data;
- (void) _private_memset(&modinfo[moduleid], 0, sizeof (TLS_modinfo));
+ (void) memset(&modinfo[moduleid], 0, sizeof (TLS_modinfo));
lmutex_unlock(&tlsm->tls_lock);
}
@@ -236,10 +238,10 @@ slow_tls_get_addr(TLS_index *tls_index)
ASSERT(moduleid < tlsm->tls_modinfo.tls_size);
tlsent = lmalloc(tlsm->tls_modinfo.tls_size * sizeof (tls_t));
if (self->ul_tlsent != NULL) {
- (void) _private_memcpy(tlsent, self->ul_tlsent,
- self->ul_ntlsent * sizeof (tls_t));
+ (void) memcpy(tlsent, self->ul_tlsent,
+ self->ul_ntlsent * sizeof (tls_t));
lfree(self->ul_tlsent,
- self->ul_ntlsent * sizeof (tls_t));
+ self->ul_ntlsent * sizeof (tls_t));
}
self->ul_tlsent = tlsent;
self->ul_ntlsent = tlsm->tls_modinfo.tls_size;
@@ -258,8 +260,8 @@ slow_tls_get_addr(TLS_index *tls_index)
/* allocate/initialize the dynamic TLS */
base = lmalloc(tlsp->tm_memsz);
if (tlsp->tm_filesz != 0)
- (void) _private_memcpy(base, tlsp->tm_tlsblock,
- tlsp->tm_filesz);
+ (void) memcpy(base, tlsp->tm_tlsblock,
+ tlsp->tm_filesz);
tlsent->tls_data = base;
tlsent->tls_size = tlsp->tm_memsz;
/* remember the constructors */
@@ -281,6 +283,9 @@ slow_tls_get_addr(TLS_index *tls_index)
} while (--arraycnt != 0);
}
+ if (base == NULL) /* kludge to get x86/x64 to boot */
+ base = (caddr_t)self - 512;
+
sigon(self);
return (base + tls_index->ti_tlsoffset);
}
@@ -323,8 +328,8 @@ tls_setup()
return;
/* static TLS initialization */
- (void) _private_memcpy((caddr_t)self - tlsm->static_tls.tls_size,
- tlsm->static_tls.tls_data, tlsm->static_tls.tls_size);
+ (void) memcpy((caddr_t)self - tlsm->static_tls.tls_size,
+ tlsm->static_tls.tls_data, tlsm->static_tls.tls_size);
/* call TLS constructors for the static TLS just initialized */
lmutex_lock(&tlsm->tls_lock);
diff --git a/usr/src/lib/libc/port/threads/tsd.c b/usr/src/lib/libc/port/threads/tsd.c
index ac89be862d..bd11c43a7f 100644
--- a/usr/src/lib/libc/port/threads/tsd.c
+++ b/usr/src/lib/libc/port/threads/tsd.c
@@ -20,7 +20,7 @@
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -111,8 +111,8 @@ _thr_keycreate(thread_key_t *pkey, void (*destructor)(void *))
new_data[0] = TSD_UNALLOCATED;
tsdm->tsdm_nused = 1;
} else {
- (void) _private_memcpy(new_data, old_data,
- old_nkeys * sizeof (void *));
+ (void) memcpy(new_data, old_data,
+ old_nkeys * sizeof (void *));
}
tsdm->tsdm_destro = new_data;
tsdm->tsdm_nkeys = new_nkeys;
@@ -299,8 +299,7 @@ _thr_setspecific_slow(thread_key_t key, void *value)
/*
* Copy the old TSD across to the new.
*/
- (void) _private_memcpy(ntsd, stsd,
- stsd->tsd_nalloc * sizeof (void *));
+ (void) memcpy(ntsd, stsd, stsd->tsd_nalloc * sizeof (void *));
lfree(stsd, stsd->tsd_nalloc * sizeof (void *));
}
diff --git a/usr/src/lib/libc/sparc/crt/cerror.s b/usr/src/lib/libc/sparc/crt/cerror.s
index 7caf5d1bf0..f702967cfa 100644
--- a/usr/src/lib/libc/sparc/crt/cerror.s
+++ b/usr/src/lib/libc/sparc/crt/cerror.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,15 +18,15 @@
*
* CDDL HEADER END
*/
-/* Copyright (c) 1988 AT&T */
-/* All Rights Reserved */
-
/*
- * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/* Copyright (c) 1988 AT&T */
+/* All Rights Reserved */
+
.ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.6 */
.file "cerror.s"
@@ -46,7 +45,7 @@
mov EINTR, %o0
1:
save %sp, -SA(MINFRAME), %sp
- call _private___errno
+ call ___errno
nop
st %i0, [%o0]
restore
diff --git a/usr/src/lib/libc/sparc/crt/cerror64.s b/usr/src/lib/libc/sparc/crt/cerror64.s
index 821e3e78db..27e4e2cd47 100644
--- a/usr/src/lib/libc/sparc/crt/cerror64.s
+++ b/usr/src/lib/libc/sparc/crt/cerror64.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -40,7 +40,7 @@
mov EINTR, %o0
1:
save %sp, -SA(MINFRAME), %sp
- call _private___errno
+ call ___errno
nop
st %i0, [%o0]
restore
diff --git a/usr/src/lib/libc/sparc/gen/getctxt.c b/usr/src/lib/libc/sparc/gen/getctxt.c
index a7fe3ebc58..b119860217 100644
--- a/usr/src/lib/libc/sparc/gen/getctxt.c
+++ b/usr/src/lib/libc/sparc/gen/getctxt.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,17 +19,16 @@
* CDDL HEADER END
*/
-/* Copyright (c) 1988 AT&T */
-/* All Rights Reserved */
-
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/* Copyright (c) 1988 AT&T */
+/* All Rights Reserved */
+
#pragma ident "%Z%%M% %I% %E% SMI"
-#pragma weak _private_getcontext = _getcontext
#pragma weak getcontext = _getcontext
#include "synonyms.h"
@@ -44,7 +42,7 @@ getcontext(ucontext_t *ucp)
greg_t *reg;
ucp->uc_flags = UC_ALL;
- if (__getcontext_syscall(ucp))
+ if (__getcontext(ucp))
return (-1);
/*
diff --git a/usr/src/lib/libc/sparc/gen/memcpy.s b/usr/src/lib/libc/sparc/gen/memcpy.s
index bfa751fd6e..2587108195 100644
--- a/usr/src/lib/libc/sparc/gen/memcpy.s
+++ b/usr/src/lib/libc/sparc/gen/memcpy.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 1987-2003 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -57,10 +57,6 @@
#include "synonyms.h"
- .weak _private_memcpy
- .type _private_memcpy, #function
- _private_memcpy = memcpy
-
ENTRY(memcpy)
st %o0, [%sp + 68] ! save des address for return val
cmp %o2, 17 ! for small counts copy bytes
diff --git a/usr/src/lib/libc/sparc/gen/memset.s b/usr/src/lib/libc/sparc/gen/memset.s
index a1f9c223c1..7dd7d51961 100644
--- a/usr/src/lib/libc/sparc/gen/memset.s
+++ b/usr/src/lib/libc/sparc/gen/memset.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 1987-2003 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -56,10 +56,6 @@
#include "synonyms.h"
- .weak _private_memset
- .type _private_memset, #function
- _private_memset = memset
-
ENTRY(memset)
mov %o0, %o5 ! copy sp before using it
cmp %o2, 7 ! if small counts, just write bytes
diff --git a/usr/src/lib/libc/sparc/gen/swapctxt.c b/usr/src/lib/libc/sparc/gen/swapctxt.c
index ed77d3042b..8c052ca843 100644
--- a/usr/src/lib/libc/sparc/gen/swapctxt.c
+++ b/usr/src/lib/libc/sparc/gen/swapctxt.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,14 +19,14 @@
* CDDL HEADER END
*/
-/* Copyright (c) 1988 AT&T */
-/* All Rights Reserved */
-
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/* Copyright (c) 1988 AT&T */
+/* All Rights Reserved */
+
#pragma ident "%Z%%M% %I% %E% SMI"
#pragma weak swapcontext = _swapcontext
@@ -42,7 +41,7 @@ swapcontext(ucontext_t *oucp, const ucontext_t *nucp)
{
greg_t *reg;
- if (__getcontext_syscall(oucp))
+ if (__getcontext(oucp))
return (-1);
/*
diff --git a/usr/src/lib/libc/sparc/mapfile-vers b/usr/src/lib/libc/sparc/mapfile-vers
index 6319501512..3c08ffb4b7 100644
--- a/usr/src/lib/libc/sparc/mapfile-vers
+++ b/usr/src/lib/libc/sparc/mapfile-vers
@@ -26,7 +26,7 @@
#
SUNW_1.23 {
- global:
+ protected:
aio_cancel64;
aio_error64;
aio_fsync64;
@@ -45,7 +45,7 @@ SUNW_1.23 {
};
SUNW_1.22.1 {
- global:
+ protected:
# Note: The atomic_OP_WIDTH_nv symbols defined here are also defined
# by the common mapfile. Here, we add the NODYNSORT attribute
# to them. On this platform, they are aliases for the non-_nv
@@ -72,6 +72,16 @@ SUNW_1.22.1 {
SUNW_1.22 {
global:
+ dladdr = FUNCTION FILTER /usr/lib/ld.so.1;
+ dladdr1 = FUNCTION FILTER /usr/lib/ld.so.1;
+ dlclose = FUNCTION FILTER /usr/lib/ld.so.1;
+ dldump = FUNCTION FILTER /usr/lib/ld.so.1;
+ dlerror = FUNCTION FILTER /usr/lib/ld.so.1;
+ dlinfo = FUNCTION FILTER /usr/lib/ld.so.1;
+ dlmopen = FUNCTION FILTER /usr/lib/ld.so.1;
+ dlopen = FUNCTION FILTER /usr/lib/ld.so.1;
+ dlsym = FUNCTION FILTER /usr/lib/ld.so.1;
+ protected:
alphasort64;
_alphasort64;
@@ -83,28 +93,19 @@ SUNW_1.22 {
atomic_add_32_nv = NODYNSORT;
atomic_add_64_nv = NODYNSORT;
- dladdr = FUNCTION FILTER /usr/lib/ld.so.1;
- dladdr1 = FUNCTION FILTER /usr/lib/ld.so.1;
- dlclose = FUNCTION FILTER /usr/lib/ld.so.1;
- dldump = FUNCTION FILTER /usr/lib/ld.so.1;
- dlerror = FUNCTION FILTER /usr/lib/ld.so.1;
- dlinfo = FUNCTION FILTER /usr/lib/ld.so.1;
- dlmopen = FUNCTION FILTER /usr/lib/ld.so.1;
- dlopen = FUNCTION FILTER /usr/lib/ld.so.1;
- dlsym = FUNCTION FILTER /usr/lib/ld.so.1;
pselect_large_fdset;
scandir64;
_scandir64;
};
SUNW_1.21.2 {
- global:
+ protected:
__makecontext_v2;
___makecontext_v2;
};
SUNW_1.21 {
- global:
+ protected:
attropen64;
_attropen64;
fstatat64;
@@ -115,12 +116,12 @@ SUNW_1.21 {
};
SUNW_1.18 {
- global:
+ protected:
select_large_fdset;
};
SUNW_1.1 {
- global:
+ protected:
creat64;
_creat64;
fgetpos64;
@@ -184,23 +185,12 @@ SUNW_1.1 {
SUNW_0.7 {
global:
- _assert;
_bufendtab;
- __builtin_alloca;
_ctype;
- file_to_decimal;
- _flsbuf;
_lastbuf;
- _mutex_held = NODYNSORT;
- _mutex_lock = NODYNSORT;
- p_online;
- _rw_read_held;
- _rw_write_held;
_sibuf;
_sobuf;
- srand48;
_sys_buslist;
- _syscall;
_sys_cldlist;
sys_errlist;
_sys_fpelist;
@@ -212,10 +202,25 @@ SUNW_0.7 {
_sys_siglistn;
_sys_siglistp;
_sys_traplist;
+ protected:
+ _assert;
+ __builtin_alloca;
+ file_to_decimal;
+ _flsbuf;
+ _mutex_held = NODYNSORT;
+ _mutex_lock = NODYNSORT;
+ p_online;
+ _rw_read_held;
+ _rw_write_held;
+ srand48;
+ _syscall;
} SISCD_2.3;
SISCD_2.3 {
global:
+ errno = NODIRECT;
+ _iob;
+ protected:
addseverity;
_addseverity;
asctime_r;
@@ -229,7 +234,6 @@ SISCD_2.3 {
_encrypt;
endgrent;
endpwent;
- errno = NODIRECT;
___errno;
fgetgrent;
fgetgrent_r;
@@ -255,7 +259,6 @@ SISCD_2.3 {
gettimeofday;
_gettimeofday;
gmtime_r;
- _iob;
localtime_r;
__mul64;
putchar_unlocked;
@@ -286,6 +289,43 @@ SISCD_2.3 {
SYSVABI_1.3 {
global:
+ _altzone;
+ calloc = NODIRECT;
+ __ctype;
+ daylight;
+ _daylight;
+ environ = NODIRECT;
+ _environ = NODIRECT;
+ free = NODIRECT;
+ frexp = FUNCTION FILTER libm.so.2;
+ getdate_err;
+ _getdate_err;
+ __huge_val;
+ __iob;
+ isnan = FUNCTION FILTER libm.so.2;
+ _isnan = FUNCTION FILTER libm.so.2;
+ isnand = FUNCTION FILTER libm.so.2;
+ _isnand = FUNCTION FILTER libm.so.2;
+ ldexp = FUNCTION FILTER libm.so.2;
+ logb = FUNCTION FILTER libm.so.2;
+ malloc = NODIRECT;
+ modf = FUNCTION FILTER libm.so.2;
+ _modf = FUNCTION FILTER libm.so.2;
+ nextafter = FUNCTION FILTER libm.so.2;
+ _nextafter = FUNCTION FILTER libm.so.2;
+ _numeric;
+ optarg;
+ opterr;
+ optind;
+ optopt;
+ realloc = NODIRECT;
+ scalb = FUNCTION FILTER libm.so.2;
+ _scalb = FUNCTION FILTER libm.so.2;
+ timezone;
+ _timezone;
+ tzname;
+ _tzname;
+ protected:
.div;
.mul;
.rem;
@@ -305,7 +345,6 @@ SYSVABI_1.3 {
_acct;
alarm;
_alarm;
- _altzone;
asctime;
__assert;
atexit;
@@ -313,7 +352,6 @@ SYSVABI_1.3 {
atoi;
atol;
bsearch;
- calloc = NODIRECT;
catclose;
_catclose;
catgets;
@@ -340,7 +378,7 @@ SYSVABI_1.3 {
clearerr;
clock;
_close;
- close = NODIRECT;
+ close;
closedir;
_closedir;
creat;
@@ -348,11 +386,8 @@ SYSVABI_1.3 {
ctermid;
_ctermid;
ctime;
- __ctype;
cuserid;
_cuserid;
- daylight;
- _daylight;
difftime;
div;
__dtou;
@@ -360,8 +395,6 @@ SYSVABI_1.3 {
_dup;
dup2;
_dup2;
- environ = NODIRECT;
- _environ = NODIRECT;
execl;
_execl;
execle;
@@ -405,16 +438,14 @@ SYSVABI_1.3 {
_fmtmsg;
fopen;
_fork;
- fork = NODIRECT;
+ fork;
fpathconf;
_fpathconf;
fprintf;
fputc;
fputs;
fread;
- free = NODIRECT;
freopen;
- frexp = FUNCTION FILTER libm.so.2;
fscanf;
fseek;
fsetpos;
@@ -437,8 +468,6 @@ SYSVABI_1.3 {
_getcwd;
getdate;
_getdate;
- getdate_err;
- _getdate_err;
getegid;
_getegid;
getenv;
@@ -496,10 +525,8 @@ SYSVABI_1.3 {
_hdestroy;
hsearch;
_hsearch;
- __huge_val;
initgroups;
_initgroups;
- __iob;
ioctl;
_ioctl;
isalnum;
@@ -514,10 +541,6 @@ SYSVABI_1.3 {
isdigit;
isgraph;
islower;
- isnan = FUNCTION FILTER libm.so.2;
- _isnan = FUNCTION FILTER libm.so.2;
- isnand = FUNCTION FILTER libm.so.2;
- _isnand = FUNCTION FILTER libm.so.2;
isprint;
ispunct;
isspace;
@@ -528,7 +551,6 @@ SYSVABI_1.3 {
labs;
lchown;
_lchown;
- ldexp = FUNCTION FILTER libm.so.2;
ldiv;
lfind;
_lfind;
@@ -538,7 +560,6 @@ SYSVABI_1.3 {
localtime;
lockf;
_lockf;
- logb = FUNCTION FILTER libm.so.2;
longjmp;
lsearch;
_lsearch;
@@ -548,7 +569,6 @@ SYSVABI_1.3 {
_lstat;
makecontext;
_makecontext;
- malloc = NODIRECT;
mblen;
mbstowcs;
mbtowc;
@@ -574,8 +594,6 @@ SYSVABI_1.3 {
_mlock;
mmap;
_mmap;
- modf = FUNCTION FILTER libm.so.2;
- _modf = FUNCTION FILTER libm.so.2;
monitor;
_monitor;
mount;
@@ -596,23 +614,16 @@ SYSVABI_1.3 {
_munlock;
munmap;
_munmap;
- nextafter = FUNCTION FILTER libm.so.2;
- _nextafter = FUNCTION FILTER libm.so.2;
nftw;
_nftw;
nice;
_nice;
nl_langinfo;
_nl_langinfo;
- _numeric;
open;
_open;
opendir;
_opendir;
- optarg;
- opterr;
- optind;
- optopt;
pathconf;
_pathconf;
pause;
@@ -677,7 +688,6 @@ SYSVABI_1.3 {
_readlink;
readv;
_readv;
- realloc = NODIRECT;
remove;
rename;
_rename;
@@ -686,8 +696,6 @@ SYSVABI_1.3 {
_rewinddir;
rmdir;
_rmdir;
- scalb = FUNCTION FILTER libm.so.2;
- _scalb = FUNCTION FILTER libm.so.2;
scanf;
seekdir;
_seekdir;
@@ -726,8 +734,8 @@ SYSVABI_1.3 {
_shmdt;
shmget;
_shmget;
- sigaction = NODIRECT;
- _sigaction = NODIRECT NODYNSORT;
+ sigaction;
+ _sigaction = NODYNSORT;
sigaddset;
_sigaddset;
sigaltstack;
@@ -842,8 +850,6 @@ SYSVABI_1.3 {
_time;
times;
_times;
- timezone;
- _timezone;
tmpfile;
tmpnam;
toascii;
@@ -858,8 +864,6 @@ SYSVABI_1.3 {
_ttyname;
twalk;
_twalk;
- tzname;
- _tzname;
tzset;
_tzset;
ulimit;
@@ -897,12 +901,6 @@ SYSVABI_1.3 {
SUNWprivate_1.1 {
global:
- __ashldi3;
- __ashrdi3;
- _cerror;
- _cerror64;
- __cmpdi2;
- __divdi3;
_dladdr = FUNCTION FILTER /usr/lib/ld.so.1;
_dladdr1 = FUNCTION FILTER /usr/lib/ld.so.1;
_dlclose = FUNCTION FILTER /usr/lib/ld.so.1;
@@ -912,6 +910,22 @@ SUNWprivate_1.1 {
_dlmopen = FUNCTION FILTER /usr/lib/ld.so.1;
_dlopen = FUNCTION FILTER /usr/lib/ld.so.1;
_dlsym = FUNCTION FILTER /usr/lib/ld.so.1;
+ _ld_libc = FUNCTION FILTER /usr/lib/ld.so.1;
+ __lyday_to_month;
+ __mon_lengths;
+ _sys_errlist;
+ _sys_errs;
+ _sys_index;
+ _sys_nerr = NODYNSORT;
+ _sys_num_err;
+ __yday_to_month;
+ protected:
+ __ashldi3;
+ __ashrdi3;
+ _cerror;
+ _cerror64;
+ __cmpdi2;
+ __divdi3;
_file_set;
__floatdidf;
__floatdisf;
@@ -920,22 +934,16 @@ SUNWprivate_1.1 {
__fseterror_u;
_fwprintf_c89;
_fwscanf_c89;
- gtty;
- _gtty;
- _hasmntopt;
_imaxabs_c89;
_imaxdiv_c89;
install_utrap;
_install_utrap;
- _ld_libc = FUNCTION FILTER /usr/lib/ld.so.1;
__lshrdi3;
- __lyday_to_month;
_memcmp = AUXILIARY /platform/$PLATFORM/lib/libc_psr.so.1;
_memcpy = AUXILIARY /platform/$PLATFORM/lib/libc_psr.so.1;
_memmove = AUXILIARY /platform/$PLATFORM/lib/libc_psr.so.1;
_memset = AUXILIARY /platform/$PLATFORM/lib/libc_psr.so.1;
__moddi3;
- __mon_lengths;
__muldi3;
nop;
_printf_c89;
@@ -956,11 +964,6 @@ SUNWprivate_1.1 {
_strtoumax_c89;
_swprintf_c89;
_swscanf_c89;
- _sys_errlist;
- _sys_errs;
- _sys_index;
- _sys_nerr = NODYNSORT;
- _sys_num_err;
__ucmpdi2;
__udivdi3;
__umoddi3;
@@ -982,13 +985,10 @@ SUNWprivate_1.1 {
_wprintf_c89;
_wscanf_c89;
_xregs_clrptr;
- __yday_to_month;
local:
__cerror = NODYNSORT;
__cerror64 = NODYNSORT;
- _private_fstat64 = NODYNSORT;
- _private_stat64 = NODYNSORT;
_seekdir64 = NODYNSORT;
_telldir64 = NODYNSORT;
};
diff --git a/usr/src/lib/libc/sparc/sys/__getcontext.s b/usr/src/lib/libc/sparc/sys/__getcontext.s
index ce2cd69835..86364e3ee3 100644
--- a/usr/src/lib/libc/sparc/sys/__getcontext.s
+++ b/usr/src/lib/libc/sparc/sys/__getcontext.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -36,8 +36,6 @@
#include "SYS.h"
- ANSI_PRAGMA_WEAK2(__getcontext_syscall,__getcontext,function)
-
ENTRY(__getcontext)
mov %o0, %o1
mov 0, %o0
diff --git a/usr/src/lib/libc/sparc/sys/_lwp_mutex_unlock.s b/usr/src/lib/libc/sparc/sys/_lwp_mutex_unlock.s
index fb2e0f2dce..79dfca3c39 100644
--- a/usr/src/lib/libc/sparc/sys/_lwp_mutex_unlock.s
+++ b/usr/src/lib/libc/sparc/sys/_lwp_mutex_unlock.s
@@ -20,7 +20,7 @@
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -36,8 +36,6 @@
#include <sys/synch32.h>
#include <../assym.h>
- ANSI_PRAGMA_WEAK2(_private_lwp_mutex_unlock,_lwp_mutex_unlock,function)
-
ENTRY(_lwp_mutex_unlock)
membar #LoadStore|#StoreStore
add %o0, MUTEX_LOCK_WORD, %o1
diff --git a/usr/src/lib/libc/sparc/sys/door.s b/usr/src/lib/libc/sparc/sys/door.s
index 2a2f4216c1..19059ef056 100644
--- a/usr/src/lib/libc/sparc/sys/door.s
+++ b/usr/src/lib/libc/sparc/sys/door.s
@@ -156,7 +156,7 @@ door_restart:
nop
save %sp, -SA(MINFRAME), %sp
- call _private_getpid /* get current process id */
+ call getpid
nop
PIC_SETUP(g1)
#ifdef __sparcv9
diff --git a/usr/src/lib/libc/sparc/sys/ptrace.c b/usr/src/lib/libc/sparc/sys/ptrace.c
index 53f9a1964a..68c923489e 100644
--- a/usr/src/lib/libc/sparc/sys/ptrace.c
+++ b/usr/src/lib/libc/sparc/sys/ptrace.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,13 +18,14 @@
*
* CDDL HEADER END
*/
+
/*
- * ptrace(2) interface built on top of proc(4).
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
*/
/*
- * Copyright 1990-2003 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
+ * ptrace(2) interface built on top of proc(4).
*/
#pragma ident "%Z%%M% %I% %E% SMI"
@@ -155,10 +155,10 @@ ptrace(int request, pid_t pid, int addr, int data)
#if PTRACE_DEBUG
fprintf(stderr, " ptrace(%s, 0x%X, 0x%X, 0x%X)\n",
- map(request), pid, addr, data);
+ map(request), pid, addr, data);
#endif
- (void) _private_mutex_lock(&pt_lock);
+ (void) mutex_lock(&pt_lock);
if (request == 0) { /* PTRACE_TRACEME, executed by traced process */
/*
@@ -206,7 +206,7 @@ ptrace(int request, pid_t pid, int addr, int data)
if (close(fd) != 0)
exit(255);
- (void) _private_mutex_unlock(&pt_lock);
+ (void) mutex_unlock(&pt_lock);
return (0);
}
@@ -238,7 +238,7 @@ again:
goto eio;
if (pread(cp->asfd, (char *)&data, sizeof (data), (off_t)addr)
== sizeof (data)) {
- (void) _private_mutex_unlock(&pt_lock);
+ (void) mutex_unlock(&pt_lock);
return (data);
}
goto eio;
@@ -256,7 +256,7 @@ again:
if ((int)xaddr >= 0 && xaddr < U_END) {
/* LINTED pointer alignment */
data = *((int *)((caddr_t)(&cp->user) + xaddr));
- (void) _private_mutex_unlock(&pt_lock);
+ (void) mutex_unlock(&pt_lock);
return (data);
}
goto eio;
@@ -271,7 +271,7 @@ again:
cp->flags |= CS_SETREGS;
if (pwrite(cp->asfd, (char *)&data, sizeof (data), (off_t)addr)
== sizeof (data)) {
- (void) _private_mutex_unlock(&pt_lock);
+ (void) mutex_unlock(&pt_lock);
return (data);
}
goto eio;
@@ -291,14 +291,14 @@ again:
data &= ~03;
cp->user.u_reg[rx] = data;
cp->flags |= CS_SETREGS;
- (void) _private_mutex_unlock(&pt_lock);
+ (void) mutex_unlock(&pt_lock);
return (data);
}
goto eio;
case 7: /* PTRACE_CONT */
case 9: /* PTRACE_SINGLESTEP */
- {
+ {
long runctl[3];
if (cp->flags & CS_SETREGS) {
@@ -325,7 +325,7 @@ again:
ps->pr_lwp.pr_reg[R_O6] = cp->user.u_reg[REG_O6];
ps->pr_lwp.pr_reg[R_O7] = cp->user.u_reg[REG_O7];
(void) pread(cp->asfd, (char *)&ps->pr_lwp.pr_reg[R_L0],
- 16*sizeof (int), (off_t)cp->user.u_reg[REG_SP]);
+ 16*sizeof (int), (off_t)cp->user.u_reg[REG_SP]);
cmd = PCSREG;
iov[0].iov_base = (caddr_t)&cmd;
iov[0].iov_len = sizeof (long);
@@ -364,16 +364,16 @@ again:
if (errno == ENOENT) {
/* current signal must have killed it */
ReleaseProc(cp);
- (void) _private_mutex_unlock(&pt_lock);
+ (void) mutex_unlock(&pt_lock);
return (data);
}
goto tryagain;
}
(void) memset((char *)ps, 0, sizeof (pstatus_t));
cp->flags = 0;
- (void) _private_mutex_unlock(&pt_lock);
+ (void) mutex_unlock(&pt_lock);
return (data);
- }
+ }
case 8: /* PTRACE_KILL */
/* overkill? */
@@ -384,7 +384,7 @@ again:
sizeof (long)+sizeof (siginfo_t));
(void) kill(pid, SIGKILL);
ReleaseProc(cp);
- (void) _private_mutex_unlock(&pt_lock);
+ (void) mutex_unlock(&pt_lock);
return (0);
default:
@@ -399,11 +399,11 @@ tryagain:
}
eio:
errno = EIO;
- (void) _private_mutex_unlock(&pt_lock);
+ (void) mutex_unlock(&pt_lock);
return (-1);
esrch:
errno = ESRCH;
- (void) _private_mutex_unlock(&pt_lock);
+ (void) mutex_unlock(&pt_lock);
return (-1);
}
@@ -644,7 +644,7 @@ ProcUpdate(cstatus_t *cp)
ps->pr_lwp.pr_reg[R_O6] = cp->user.u_reg[REG_O6];
ps->pr_lwp.pr_reg[R_O7] = cp->user.u_reg[REG_O7];
(void) pread(cp->asfd, (char *)&ps->pr_lwp.pr_reg[R_L0],
- 16*sizeof (int), (off_t)cp->user.u_reg[REG_SP]);
+ 16*sizeof (int), (off_t)cp->user.u_reg[REG_SP]);
cmd = PCSREG;
iov[0].iov_base = (caddr_t)&cmd;
iov[0].iov_len = sizeof (long);
diff --git a/usr/src/lib/libc/sparc/threads/asm_subr.s b/usr/src/lib/libc/sparc/threads/asm_subr.s
index 22245d6155..f2fbb6adab 100644
--- a/usr/src/lib/libc/sparc/threads/asm_subr.s
+++ b/usr/src/lib/libc/sparc/threads/asm_subr.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -128,11 +128,6 @@
RET
SET_SIZE(__lwp_unpark_all)
- ENTRY(lwp_yield)
- SYSTRAP_RVAL1(yield)
- RET
- SET_SIZE(lwp_yield)
-
/*
* __sighndlr(int sig, siginfo_t *si, ucontex_t *uc, void (*hndlr)())
*
diff --git a/usr/src/lib/libc/sparc/threads/machdep.c b/usr/src/lib/libc/sparc/threads/machdep.c
index 0fc62303f8..c5510f776f 100644
--- a/usr/src/lib/libc/sparc/threads/machdep.c
+++ b/usr/src/lib/libc/sparc/threads/machdep.c
@@ -48,8 +48,8 @@ setup_context(ucontext_t *ucp, void *(*func)(ulwp_t *),
SA(MINFRAME);
/* clear the context and the top stack frame */
- (void) _memset(ucp, 0, sizeof (*ucp));
- (void) _memset((void *)stack, 0, SA(MINFRAME));
+ (void) memset(ucp, 0, sizeof (*ucp));
+ (void) memset((void *)stack, 0, SA(MINFRAME));
/* fill in registers of interest */
ucp->uc_flags |= UC_CPU;
@@ -77,7 +77,7 @@ _thr_setup(ulwp_t *self)
self->ul_ustack.ss_sp = (void *)(self->ul_stktop - self->ul_stksiz);
self->ul_ustack.ss_size = self->ul_stksiz;
self->ul_ustack.ss_flags = 0;
- (void) _private_setustack(&self->ul_ustack);
+ (void) setustack(&self->ul_ustack);
update_sched(self);
tls_setup();
diff --git a/usr/src/lib/libc/sparcv9/crt/cerror.s b/usr/src/lib/libc/sparcv9/crt/cerror.s
index 791a178198..8ee5fb279a 100644
--- a/usr/src/lib/libc/sparcv9/crt/cerror.s
+++ b/usr/src/lib/libc/sparcv9/crt/cerror.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,15 +18,15 @@
*
* CDDL HEADER END
*/
-/* Copyright (c) 1988 AT&T */
-/* All Rights Reserved */
-
/*
- * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/* Copyright (c) 1988 AT&T */
+/* All Rights Reserved */
+
.ident "%Z%%M% %I% %E% SMI"
.file "%M%"
@@ -46,7 +45,7 @@
mov EINTR, %o0
1:
save %sp, -SA(MINFRAME), %sp
- call _private___errno
+ call ___errno
nop
st %i0, [%o0]
restore
diff --git a/usr/src/lib/libc/sparcv9/gen/getctxt.c b/usr/src/lib/libc/sparcv9/gen/getctxt.c
index a7fe3ebc58..b119860217 100644
--- a/usr/src/lib/libc/sparcv9/gen/getctxt.c
+++ b/usr/src/lib/libc/sparcv9/gen/getctxt.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,17 +19,16 @@
* CDDL HEADER END
*/
-/* Copyright (c) 1988 AT&T */
-/* All Rights Reserved */
-
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/* Copyright (c) 1988 AT&T */
+/* All Rights Reserved */
+
#pragma ident "%Z%%M% %I% %E% SMI"
-#pragma weak _private_getcontext = _getcontext
#pragma weak getcontext = _getcontext
#include "synonyms.h"
@@ -44,7 +42,7 @@ getcontext(ucontext_t *ucp)
greg_t *reg;
ucp->uc_flags = UC_ALL;
- if (__getcontext_syscall(ucp))
+ if (__getcontext(ucp))
return (-1);
/*
diff --git a/usr/src/lib/libc/sparcv9/gen/memcpy.s b/usr/src/lib/libc/sparcv9/gen/memcpy.s
index 987c480290..46e22d08b2 100644
--- a/usr/src/lib/libc/sparcv9/gen/memcpy.s
+++ b/usr/src/lib/libc/sparcv9/gen/memcpy.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 1997-2003 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -60,10 +60,6 @@
#include "synonyms.h"
- .weak _private_memcpy
- .type _private_memcpy, #function
- _private_memcpy = memcpy
-
ENTRY(memcpy)
ENTRY(__align_cpy_1)
mov %o0, %g5 ! save des address for return val
diff --git a/usr/src/lib/libc/sparcv9/gen/memset.s b/usr/src/lib/libc/sparcv9/gen/memset.s
index 9f35f5f195..72fe265317 100644
--- a/usr/src/lib/libc/sparcv9/gen/memset.s
+++ b/usr/src/lib/libc/sparcv9/gen/memset.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 1997-2003 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -78,10 +78,6 @@
#include "synonyms.h"
- .weak _private_memset
- .type _private_memset, #function
- _private_memset = memset
-
ENTRY(memset)
mov %o0, %o5 ! need to return this value
cmp %o2, 7
diff --git a/usr/src/lib/libc/sparcv9/gen/swapctxt.c b/usr/src/lib/libc/sparcv9/gen/swapctxt.c
index ed77d3042b..8c052ca843 100644
--- a/usr/src/lib/libc/sparcv9/gen/swapctxt.c
+++ b/usr/src/lib/libc/sparcv9/gen/swapctxt.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,14 +19,14 @@
* CDDL HEADER END
*/
-/* Copyright (c) 1988 AT&T */
-/* All Rights Reserved */
-
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/* Copyright (c) 1988 AT&T */
+/* All Rights Reserved */
+
#pragma ident "%Z%%M% %I% %E% SMI"
#pragma weak swapcontext = _swapcontext
@@ -42,7 +41,7 @@ swapcontext(ucontext_t *oucp, const ucontext_t *nucp)
{
greg_t *reg;
- if (__getcontext_syscall(oucp))
+ if (__getcontext(oucp))
return (-1);
/*
diff --git a/usr/src/lib/libc/sparcv9/mapfile-vers b/usr/src/lib/libc/sparcv9/mapfile-vers
index 5c84dc96f6..ee7b4afdbb 100644
--- a/usr/src/lib/libc/sparcv9/mapfile-vers
+++ b/usr/src/lib/libc/sparcv9/mapfile-vers
@@ -26,7 +26,7 @@
#
SUNW_1.22.1 {
- global:
+ protected:
# Note: The atomic_OP_WIDTH_nv symbols defined here are also defined
# by the common mapfile. Here, we add the NODYNSORT attribute
# to them. On this platform, they are aliases for the non-_nv
@@ -53,14 +53,6 @@ SUNW_1.22.1 {
SUNW_1.22 {
global:
- # Note: atomic_add_[16,32,64]_nv are also defined by the common
- # mapfile. Here, we add the NODYNSORT attribute to them. On this
- # platform, they are aliases for the non-_nv versions. If that is
- # changed, these lines should be removed.
- atomic_add_16_nv = NODYNSORT;
- atomic_add_32_nv = NODYNSORT;
- atomic_add_64_nv = NODYNSORT;
-
dladdr = FUNCTION FILTER /usr/lib/sparcv9/ld.so.1;
dladdr1 = FUNCTION FILTER /usr/lib/sparcv9/ld.so.1;
dlclose = FUNCTION FILTER /usr/lib/sparcv9/ld.so.1;
@@ -70,22 +62,82 @@ SUNW_1.22 {
dlmopen = FUNCTION FILTER /usr/lib/sparcv9/ld.so.1;
dlopen = FUNCTION FILTER /usr/lib/sparcv9/ld.so.1;
dlsym = FUNCTION FILTER /usr/lib/sparcv9/ld.so.1;
+ protected:
+ # Note: atomic_add_[16,32,64]_nv are also defined by the common
+ # mapfile. Here, we add the NODYNSORT attribute to them. On this
+ # platform, they are aliases for the non-_nv versions. If that is
+ # changed, these lines should be removed.
+ atomic_add_16_nv = NODYNSORT;
+ atomic_add_32_nv = NODYNSORT;
+ atomic_add_64_nv = NODYNSORT;
+
walkcontext;
};
SUNW_1.21.2 {
- global:
+ protected:
__makecontext_v2;
___makecontext_v2;
};
SUNW_1.1 {
- global:
+ protected:
__flt_rounds;
};
SUNW_0.7 {
global:
+ _altzone;
+ calloc = NODIRECT;
+ _ctype;
+ __ctype;
+ daylight;
+ _daylight;
+ environ = NODIRECT;
+ _environ = NODIRECT;
+ errno = NODIRECT;
+ free = NODIRECT;
+ frexp = FUNCTION FILTER libm.so.2;
+ getdate_err;
+ _getdate_err;
+ __huge_val;
+ _iob;
+ __iob;
+ isnan = FUNCTION FILTER libm.so.2;
+ _isnan = FUNCTION FILTER libm.so.2;
+ isnand = FUNCTION FILTER libm.so.2;
+ _isnand = FUNCTION FILTER libm.so.2;
+ ldexp = FUNCTION FILTER libm.so.2;
+ logb = FUNCTION FILTER libm.so.2;
+ malloc = NODIRECT;
+ modf = FUNCTION FILTER libm.so.2;
+ _modf = FUNCTION FILTER libm.so.2;
+ nextafter = FUNCTION FILTER libm.so.2;
+ _nextafter = FUNCTION FILTER libm.so.2;
+ _numeric;
+ optarg;
+ opterr;
+ optind;
+ optopt;
+ realloc = NODIRECT;
+ scalb = FUNCTION FILTER libm.so.2;
+ _scalb = FUNCTION FILTER libm.so.2;
+ _sibuf;
+ _sobuf;
+ _sys_buslist;
+ _sys_cldlist;
+ _sys_fpelist;
+ _sys_segvlist;
+ _sys_siginfolistp;
+ _sys_siglist;
+ _sys_siglistn;
+ _sys_siglistp;
+ _sys_traplist;
+ timezone;
+ _timezone;
+ tzname;
+ _tzname;
+ protected:
abort;
abs;
access;
@@ -104,7 +156,6 @@ SUNW_0.7 {
__align_cpy_4;
# __align_cpy_8 is same as __align_cpy_16
__align_cpy_8 = NODYNSORT;
- _altzone;
asctime;
asctime_r;
_assert;
@@ -115,7 +166,6 @@ SUNW_0.7 {
atol;
bsearch;
__builtin_alloca;
- calloc = NODIRECT;
catclose;
_catclose;
catgets;
@@ -142,7 +192,7 @@ SUNW_0.7 {
clearerr;
clock;
_close;
- close = NODIRECT;
+ close;
closedir;
_closedir;
creat;
@@ -153,12 +203,8 @@ SUNW_0.7 {
_ctermid;
ctime;
ctime_r;
- _ctype;
- __ctype;
cuserid;
_cuserid;
- daylight;
- _daylight;
difftime;
div;
__dtou;
@@ -171,9 +217,6 @@ SUNW_0.7 {
_encrypt;
endgrent;
endpwent;
- environ = NODIRECT;
- _environ = NODIRECT;
- errno = NODIRECT;
___errno;
execl;
_execl;
@@ -225,16 +268,14 @@ SUNW_0.7 {
_fmtmsg;
fopen;
_fork;
- fork = NODIRECT;
+ fork;
fpathconf;
_fpathconf;
fprintf;
fputc;
fputs;
fread;
- free = NODIRECT;
freopen;
- frexp = FUNCTION FILTER libm.so.2;
fscanf;
fseek;
fsetpos;
@@ -261,8 +302,6 @@ SUNW_0.7 {
_getcwd;
getdate;
_getdate;
- getdate_err;
- _getdate_err;
getegid;
_getegid;
getenv;
@@ -334,11 +373,8 @@ SUNW_0.7 {
_hdestroy;
hsearch;
_hsearch;
- __huge_val;
initgroups;
_initgroups;
- _iob;
- __iob;
ioctl;
_ioctl;
isalnum;
@@ -353,10 +389,6 @@ SUNW_0.7 {
isdigit;
isgraph;
islower;
- isnan = FUNCTION FILTER libm.so.2;
- _isnan = FUNCTION FILTER libm.so.2;
- isnand = FUNCTION FILTER libm.so.2;
- _isnand = FUNCTION FILTER libm.so.2;
isprint;
ispunct;
isspace;
@@ -367,7 +399,6 @@ SUNW_0.7 {
labs;
lchown;
_lchown;
- ldexp = FUNCTION FILTER libm.so.2;
ldiv;
lfind;
_lfind;
@@ -378,7 +409,6 @@ SUNW_0.7 {
localtime_r;
lockf;
_lockf;
- logb = FUNCTION FILTER libm.so.2;
longjmp;
lsearch;
_lsearch;
@@ -388,7 +418,6 @@ SUNW_0.7 {
_lstat;
makecontext;
_makecontext;
- malloc = NODIRECT;
mblen;
mbstowcs;
mbtowc;
@@ -414,8 +443,6 @@ SUNW_0.7 {
_mlock;
mmap;
_mmap;
- modf = FUNCTION FILTER libm.so.2;
- _modf = FUNCTION FILTER libm.so.2;
monitor;
_monitor;
mount;
@@ -438,23 +465,16 @@ SUNW_0.7 {
_munmap;
_mutex_held = NODYNSORT;
_mutex_lock = NODYNSORT;
- nextafter = FUNCTION FILTER libm.so.2;
- _nextafter = FUNCTION FILTER libm.so.2;
nftw;
_nftw;
nice;
_nice;
nl_langinfo;
_nl_langinfo;
- _numeric;
open;
_open;
opendir;
_opendir;
- optarg;
- opterr;
- optind;
- optopt;
pathconf;
_pathconf;
pause;
@@ -526,7 +546,6 @@ SUNW_0.7 {
_readlink;
readv;
_readv;
- realloc = NODIRECT;
remove;
rename;
_rename;
@@ -539,8 +558,6 @@ SUNW_0.7 {
_rw_write_held;
sbrk;
_sbrk;
- scalb = FUNCTION FILTER libm.so.2;
- _scalb = FUNCTION FILTER libm.so.2;
scanf;
seekdir;
_seekdir;
@@ -585,9 +602,8 @@ SUNW_0.7 {
_shmdt;
shmget;
_shmget;
- _sibuf;
- sigaction = NODIRECT;
- _sigaction = NODIRECT NODYNSORT;
+ sigaction;
+ _sigaction = NODYNSORT;
sigaddset;
_sigaddset;
sigaltstack;
@@ -627,7 +643,6 @@ SUNW_0.7 {
_sigsuspend;
sleep;
_sleep;
- _sobuf;
__sparc_utrap_install;
sprintf;
srand;
@@ -671,21 +686,12 @@ SUNW_0.7 {
_symlink;
sync;
_sync;
- _sys_buslist;
_syscall;
- _sys_cldlist;
sysconf;
_sysconf;
- _sys_fpelist;
sysinfo;
_sysinfo;
- _sys_segvlist;
- _sys_siginfolistp;
- _sys_siglist;
- _sys_siglistn;
- _sys_siglistp;
system;
- _sys_traplist;
tcdrain;
_tcdrain;
tcflow;
@@ -718,8 +724,6 @@ SUNW_0.7 {
_time;
times;
_times;
- timezone;
- _timezone;
tmpfile;
tmpnam;
toascii;
@@ -735,8 +739,6 @@ SUNW_0.7 {
ttyname_r;
twalk;
_twalk;
- tzname;
- _tzname;
tzset;
_tzset;
ulimit;
@@ -774,7 +776,6 @@ SUNW_0.7 {
SUNWprivate_1.1 {
global:
- _cerror;
_dladdr = FUNCTION FILTER /usr/lib/sparcv9/ld.so.1;
_dladdr1 = FUNCTION FILTER /usr/lib/sparcv9/ld.so.1;
_dlclose = FUNCTION FILTER /usr/lib/sparcv9/ld.so.1;
@@ -784,19 +785,19 @@ SUNWprivate_1.1 {
_dlmopen = FUNCTION FILTER /usr/lib/sparcv9/ld.so.1;
_dlopen = FUNCTION FILTER /usr/lib/sparcv9/ld.so.1;
_dlsym = FUNCTION FILTER /usr/lib/sparcv9/ld.so.1;
+ _ld_libc = FUNCTION FILTER /usr/lib/sparcv9/ld.so.1;
+ __lyday_to_month;
+ __mon_lengths;
+ __yday_to_month;
+ protected:
+ _cerror;
__fseterror_u;
- gtty;
- _gtty;
- _hasmntopt;
install_utrap;
_install_utrap;
- _ld_libc = FUNCTION FILTER /usr/lib/sparcv9/ld.so.1;
- __lyday_to_month;
_memcmp = AUXILIARY /platform/$PLATFORM/lib/sparcv9/libc_psr.so.1;
_memcpy = AUXILIARY /platform/$PLATFORM/lib/sparcv9/libc_psr.so.1;
_memmove = AUXILIARY /platform/$PLATFORM/lib/sparcv9/libc_psr.so.1;
_memset = AUXILIARY /platform/$PLATFORM/lib/sparcv9/libc_psr.so.1;
- __mon_lengths;
nop;
_Q_cplx_div;
_Q_cplx_div_ix;
@@ -808,7 +809,6 @@ SUNWprivate_1.1 {
_Q_cplx_mul;
_QgetRD;
_xregs_clrptr;
- __yday_to_month;
local:
__cerror = NODYNSORT;