forked from KolibriOS/kolibrios
newlib: update
git-svn-id: svn://kolibrios.org@6099 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -33,13 +33,13 @@
|
||||
and do not supply functional interfaces for any of the reentrant
|
||||
calls. With this method, the reentrant syscalls are redefined to
|
||||
directly call the regular system call without the reentrancy argument.
|
||||
When you do this, specify both -DREENTRANT_SYSCALLS_PROVIDED and
|
||||
When you do this, specify both -DREENTRANT_SYSCALLS_PROVIDED and
|
||||
-DMISSING_SYSCALL_NAMES via newlib_cflags in configure.host and do
|
||||
not specify "syscall_dir".
|
||||
|
||||
Stubs of the reentrant versions of the syscalls exist in the libc/reent
|
||||
source directory and are provided if REENTRANT_SYSCALLS_PROVIDED isn't
|
||||
defined. These stubs call the native system calls: _open, _close, etc.
|
||||
source directory and are provided if REENTRANT_SYSCALLS_PROVIDED isn't
|
||||
defined. These stubs call the native system calls: _open, _close, etc.
|
||||
if MISSING_SYSCALL_NAMES is *not* defined, otherwise they call the
|
||||
non-underscored versions: open, close, etc. when MISSING_SYSCALL_NAMES
|
||||
*is* defined.
|
||||
@@ -51,17 +51,17 @@
|
||||
keep a separate errno value which is intuitive since the application flow
|
||||
cannot check for failure reliably otherwise.
|
||||
|
||||
The reentrant syscalls are either provided by the platform, by the
|
||||
libc/reent stubs, or in the case of both MISSING_SYSCALL_NAMES and
|
||||
The reentrant syscalls are either provided by the platform, by the
|
||||
libc/reent stubs, or in the case of both MISSING_SYSCALL_NAMES and
|
||||
REENTRANT_SYSCALLS_PROVIDED being defined, the calls are redefined to
|
||||
simply call the regular syscalls with no reentrancy struct argument.
|
||||
|
||||
A single-threaded application does not need to worry about the reentrancy
|
||||
structure. It is used internally.
|
||||
structure. It is used internally.
|
||||
|
||||
A multi-threaded application needs either to manually manage reentrancy
|
||||
A multi-threaded application needs either to manually manage reentrancy
|
||||
structures or use dynamic reentrancy.
|
||||
|
||||
|
||||
Manually managing reentrancy structures entails calling special reentrant
|
||||
versions of newlib functions that have an additional reentrancy argument.
|
||||
For example, _printf_r. By convention, the first argument is the
|
||||
@@ -76,7 +76,7 @@
|
||||
to __getreent(). This function needs to be implemented by the platform
|
||||
and it is meant to return the reentrancy structure for the current
|
||||
thread. When the regular C functions (e.g. printf) go to call internal
|
||||
routines with the default _REENT structure, they end up calling with
|
||||
routines with the default _REENT structure, they end up calling with
|
||||
the reentrancy structure for the thread. Thus, application code does not
|
||||
need to call the _r routines nor worry about reentrancy structures. */
|
||||
|
||||
@@ -116,10 +116,10 @@ struct timezone;
|
||||
#define _kill_r(__reent, __pid, __signal) kill(__pid, __signal)
|
||||
#define _link_r(__reent, __oldpath, __newpath) link(__oldpath, __newpath)
|
||||
#define _lseek_r(__reent, __fdes, __off, __w) lseek(__fdes, __off, __w)
|
||||
#define _mkdir_r(__reent, __path, __m) mkdir(__path, __m)
|
||||
#define _mkdir_r(__reent, __path, __m) mkdir(__path, __m)
|
||||
#define _open_r(__reent, __path, __flag, __m) open(__path, __flag, __m)
|
||||
#define _read_r(__reent, __fd, __buff, __cnt) read(__fd, __buff, __cnt)
|
||||
#define _rename_r(__reent, __old, __new) rename(__old, __new)
|
||||
#define _rename_r(__reent, __old, __new) rename(__old, __new)
|
||||
#define _sbrk_r(__reent, __incr) sbrk(__incr)
|
||||
#define _stat_r(__reent, __path, __buff) stat(__path, __buff)
|
||||
#define _times_r(__reent, __time) times(__time)
|
||||
|
Reference in New Issue
Block a user