From 9ef0d5fb5b0acfd35d73a5557198f46525ab1667 Mon Sep 17 00:00:00 2001 From: cvs2svn Date: Sun, 13 Apr 2014 15:49:51 +0000 Subject: This commit was manufactured by cvs2git to create tag 'butholakala'. --- src/lib/libc/include/ctype_private.h | 7 -- src/lib/libc/include/namespace.h | 18 ---- src/lib/libc/include/thread_private.h | 175 ---------------------------------- 3 files changed, 200 deletions(-) delete mode 100644 src/lib/libc/include/ctype_private.h delete mode 100644 src/lib/libc/include/namespace.h delete mode 100644 src/lib/libc/include/thread_private.h (limited to 'src/lib/libc/include') diff --git a/src/lib/libc/include/ctype_private.h b/src/lib/libc/include/ctype_private.h deleted file mode 100644 index 39cc792ea4..0000000000 --- a/src/lib/libc/include/ctype_private.h +++ /dev/null @@ -1,7 +0,0 @@ -/* $OpenBSD: ctype_private.h,v 1.1 2005/08/08 05:53:00 espie Exp $ */ -/* Written by Marc Espie, public domain */ -#define CTYPE_NUM_CHARS 256 -extern const char _C_ctype_[]; -extern const short _C_toupper_[]; -extern const short _C_tolower_[]; - diff --git a/src/lib/libc/include/namespace.h b/src/lib/libc/include/namespace.h deleted file mode 100644 index 4a51f15ddf..0000000000 --- a/src/lib/libc/include/namespace.h +++ /dev/null @@ -1,18 +0,0 @@ -/* $OpenBSD: namespace.h,v 1.2 1996/08/19 08:28:08 tholo Exp $ */ - -#define catclose _catclose -#define catgets _catgets -#define catopen _catopen -#define err _err -#define errx _errx -#define strtoq _strtoq -#define strtouq _strtouq -#define sys_errlist _sys_errlist -#define sys_nerr _sys_nerr -#define sys_siglist _sys_siglist -#define verr _verr -#define verrx _verrx -#define vwarn _vwarn -#define vwarnx _vwarnx -#define warn _warn -#define warnx _warnx diff --git a/src/lib/libc/include/thread_private.h b/src/lib/libc/include/thread_private.h deleted file mode 100644 index 673fb9c6a6..0000000000 --- a/src/lib/libc/include/thread_private.h +++ /dev/null @@ -1,175 +0,0 @@ -/* $OpenBSD: thread_private.h,v 1.25 2011/10/16 06:29:56 guenther Exp $ */ - -/* PUBLIC DOMAIN: No Rights Reserved. Marco S Hyman */ - -#ifndef _THREAD_PRIVATE_H_ -#define _THREAD_PRIVATE_H_ - -/* - * This file defines the thread library interface to libc. Thread - * libraries must implement the functions described here for proper - * inter-operation with libc. libc contains weak versions of the - * described functions for operation in a non-threaded environment. - */ - -/* - * This variable is 0 until a second thread is created. - */ -extern int __isthreaded; - -/* - * Weak symbols are used in libc so that the thread library can - * efficiently wrap libc functions. - * - * Use WEAK_NAME(n) to get a libc-private name for n (_weak_n), - * WEAK_ALIAS(n) to generate the weak symbol n pointing to _weak_n, - * WEAK_PROTOTYPE(n) to generate a prototype for _weak_n (based on n). - */ -#define WEAK_NAME(name) __CONCAT(_weak_,name) -#define WEAK_ALIAS(name) __weak_alias(name, WEAK_NAME(name)) -#ifdef __GNUC__ -#define WEAK_PROTOTYPE(name) __typeof__(name) WEAK_NAME(name) -#else -#define WEAK_PROTOTYPE(name) /* typeof() only in gcc */ -#endif - -/* - * Ditto for hand-written syscall stubs: - * - * Use STUB_NAME(n) to get the strong name of the stub: _thread_sys_n - * STUB_ALIAS(n) to generate the weak symbol n pointing to _thread_sys_n, - * STUB_PROTOTYPE(n) to generate a prototype for _thread_sys_n (based on n). - */ -#define STUB_NAME(name) __CONCAT(_thread_sys_,name) -#define STUB_ALIAS(name) __weak_alias(name, STUB_NAME(name)) -#ifdef __GNUC__ -#define STUB_PROTOTYPE(name) __typeof__(name) STUB_NAME(name) -#else -#define STUB_PROTOTYPE(name) /* typeof() only in gcc */ -#endif - -/* - * helper macro to make unique names in the thread namespace - */ -#define __THREAD_NAME(name) __CONCAT(_thread_tagname_,name) - -/* - * helper functions that exist as (weak) null functions in libc and - * (strong) functions in the thread library. These functions: - * - * _thread_tag_lock: - * lock the mutex associated with the given tag. If the given - * tag is NULL a tag is first allocated. - * - * _thread_tag_unlock: - * unlock the mutex associated with the given tag. If the given - * tag is NULL a tag is first allocated. - * - * _thread_tag_storage: - * return a pointer to per thread instance of data associated - * with the given tag. If the given tag is NULL a tag is first - * allocated. - * - * _thread_mutex_lock: - * lock the given mutex. If the given mutex is NULL, - * rely on rthreads/pthreads implementation to initialize - * the mutex before locking. - * - * _thread_mutex_unlock: - * unlock the given mutex. - * - * _thread_mutex_destroy: - * destroy the given mutex. - */ -void _thread_tag_lock(void **); -void _thread_tag_unlock(void **); -void *_thread_tag_storage(void **, void *, size_t, void *); -void _thread_mutex_lock(void **); -void _thread_mutex_unlock(void **); -void _thread_mutex_destroy(void **); - -/* - * Macros used in libc to access thread mutex, keys, and per thread storage. - * _THREAD_PRIVATE_KEY and _THREAD_PRIVATE_MUTEX are different macros for - * historical reasons. They do the same thing, define a static variable - * keyed by 'name' that identifies a mutex and a key to identify per thread - * data. - */ -#define _THREAD_PRIVATE_KEY(name) \ - static void *__THREAD_NAME(name) -#define _THREAD_PRIVATE_MUTEX(name) \ - static void *__THREAD_NAME(name) -#define _THREAD_PRIVATE_MUTEX_LOCK(name) \ - _thread_tag_lock(&(__THREAD_NAME(name))) -#define _THREAD_PRIVATE_MUTEX_UNLOCK(name) \ - _thread_tag_unlock(&(__THREAD_NAME(name))) -#define _THREAD_PRIVATE(keyname, storage, error) \ - _thread_tag_storage(&(__THREAD_NAME(keyname)), &(storage), \ - sizeof (storage), error) - -/* - * Macros used in libc to access mutexes. - */ -#define _MUTEX_LOCK(mutex) \ - do { \ - if (__isthreaded) \ - _thread_mutex_lock(mutex); \ - } while (0) -#define _MUTEX_UNLOCK(mutex) \ - do { \ - if (__isthreaded) \ - _thread_mutex_unlock(mutex); \ - } while (0) -#define _MUTEX_DESTROY(mutex) \ - do { \ - if (__isthreaded) \ - _thread_mutex_destroy(mutex); \ - } while (0) - -/* - * Resolver code is special cased in that it uses global keys. - */ -extern void *__THREAD_NAME(_res); -extern void *__THREAD_NAME(_res_ext); -extern void *__THREAD_NAME(serv_mutex); - -/* - * malloc lock/unlock prototypes and definitions - */ -void _thread_malloc_lock(void); -void _thread_malloc_unlock(void); - -#define _MALLOC_LOCK() do { \ - if (__isthreaded) \ - _thread_malloc_lock(); \ - } while (0) -#define _MALLOC_UNLOCK() do { \ - if (__isthreaded) \ - _thread_malloc_unlock();\ - } while (0) - -void _thread_atexit_lock(void); -void _thread_atexit_unlock(void); - -#define _ATEXIT_LOCK() do { \ - if (__isthreaded) \ - _thread_atexit_lock(); \ - } while (0) -#define _ATEXIT_UNLOCK() do { \ - if (__isthreaded) \ - _thread_atexit_unlock();\ - } while (0) - -void _thread_arc4_lock(void); -void _thread_arc4_unlock(void); - -#define _ARC4_LOCK() do { \ - if (__isthreaded) \ - _thread_arc4_lock(); \ - } while (0) -#define _ARC4_UNLOCK() do { \ - if (__isthreaded) \ - _thread_arc4_unlock();\ - } while (0) - -#endif /* _THREAD_PRIVATE_H_ */ -- cgit v1.2.3-55-g6feb