Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 05 Jan 2010 14:48:18 +0800
From:      David Xu <davidxu@freebsd.org>
To:        threads@freebsd.org, Daniel Eischen <deischen@freebsd.org>
Subject:   Underline version of semaphore functions
Message-ID:  <4B42E0B2.4010507@freebsd.org>

next in thread | raw e-mail | index | archive | help
I saw underline version of semaphore functions in
libc/include/namespace.h:

#define         sem_close                       _sem_close
#define         sem_destroy                     _sem_destroy
#define         sem_getvalue                    _sem_getvalue
#define         sem_init                        _sem_init
#define         sem_open                        _sem_open
#define         sem_post                        _sem_post
#define         sem_timedwait                   _sem_timedwait
#define         sem_trywait                     _sem_trywait
#define         sem_unlink                      _sem_unlink
#define         sem_wait                        _sem_wait


but libc never has them:
pe6300:~> readelf -s /lib/libc.so.7 | grep _sem
     35: 000459d4     0 FUNC    GLOBAL DEFAULT   10
__sys_semsys@@FBSDprivate_1.0
    154: 000457d4     0 FUNC    WEAK   DEFAULT   10
___semctl@@FBSDprivate_1.0
    161: 0003a5e0    81 FUNC    GLOBAL DEFAULT   10
__sem_wait@@FBSDprivate_1.0
    814: 0003a2e0   232 FUNC    GLOBAL DEFAULT   10
__sem_destroy@@FBSDprivate_1.0
    850: 000457d4     0 FUNC    WEAK   DEFAULT   10 __semctl@@FBSD_1.0
    903: 0003a0c0   418 FUNC    GLOBAL DEFAULT   10
__sem_open@@FBSDprivate_1.0
   1005: 00039f00    35 FUNC    GLOBAL DEFAULT   10
__sem_unlink@@FBSDprivate_1.0
   1173: 000457b4     0 FUNC    GLOBAL DEFAULT   10
__sys_semget@@FBSDprivate_1.0
   1451: 0003a270   108 FUNC    GLOBAL DEFAULT   10
__sem_init@@FBSDprivate_1.0
   1520: 00039f80   183 FUNC    GLOBAL DEFAULT   10
__sem_close@@FBSDprivate_1.0
   1578: 0003a3d0   147 FUNC    GLOBAL DEFAULT   10
__sem_getvalue@@FBSDprivate_1.0
   1614: 0003a530   164 FUNC    GLOBAL DEFAULT   10
__sem_trywait@@FBSDprivate_1.0
   2152: 0003a470    81 FUNC    GLOBAL DEFAULT   10
__sem_post@@FBSDprivate_1.0
   2177: 00045794     0 FUNC    GLOBAL DEFAULT   10
__sys_semop@@FBSDprivate_1.0
   2323: 00045794     0 FUNC    WEAK   DEFAULT   10 _semop@@FBSDprivate_1.0
   2452: 000457d4     0 FUNC    GLOBAL DEFAULT   10
__sys___semctl@@FBSDprivate_1.0
   2455: 000457b4     0 FUNC    WEAK   DEFAULT   10 _semget@@FBSDprivate_1.0
   2511: 0003a4d0    88 FUNC    GLOBAL DEFAULT   10
__sem_timedwait@@FBSDprivate_1.0
   2543: 000459d4     0 FUNC    WEAK   DEFAULT   10 _semsys@@FBSDprivate_1.0

however libthr provided them:

pe6300:~> readelf -s /lib/libthr.so.3  | grep _sem
     46: 000062d0   326 FUNC    GLOBAL DEFAULT   10
_sem_timedwait@@FBSDprivate_1.0
    148: 00006420   244 FUNC    GLOBAL DEFAULT   10
_sem_wait@@FBSDprivate_1.0
    192: 00006250   118 FUNC    GLOBAL DEFAULT   10
_sem_destroy@@FBSDprivate_1.0
    206: 00006060   107 FUNC    GLOBAL DEFAULT   10
_sem_getvalue@@FBSDprivate_1.0
    252: 000060d0   210 FUNC    GLOBAL DEFAULT   10
_sem_init@@FBSDprivate_1.0
    303: 000061b0   153 FUNC    GLOBAL DEFAULT   10
_sem_post@@FBSDprivate_1.0
    354: 00006520   146 FUNC    GLOBAL DEFAULT   10
_sem_trywait@@FBSDprivate_1.0





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