mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
- Added more semaphore locking around the basic stdio, memory, locale
and dirent data operations. That should do it! While the library is not reentrant (this is not ixemul.library) it should be thread-safe now. Thread-safe in the sense of POSIX 1003.1c-1995. git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14842 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: ctype_toupper.c,v 1.2 2005-01-02 09:07:07 obarthel Exp $
|
||||
* $Id: ctype_toupper.c,v 1.3 2005-02-27 21:58:21 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@ -43,6 +43,8 @@ toupper(int c)
|
||||
DECLARE_LOCALEBASE();
|
||||
int result;
|
||||
|
||||
__locale_lock();
|
||||
|
||||
if(__locale_table[LC_CTYPE] != NULL)
|
||||
{
|
||||
assert( LocaleBase != NULL );
|
||||
@ -54,5 +56,7 @@ toupper(int c)
|
||||
result = ('a' <= c && c <= 'z') ? (c - ('a' - 'A')) : c;
|
||||
}
|
||||
|
||||
__locale_unlock();
|
||||
|
||||
return(result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user