OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib/] [newlib/] [libc/] [stdlib/] [envlock.c] - Blame information for rev 56

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 56 joel
/*
2
FUNCTION
3
<<__env_lock>>, <<__env_unlock>>--lock environ variable
4
 
5
INDEX
6
        __env_lock
7
INDEX
8
        __env_unlock
9
 
10
ANSI_SYNOPSIS
11
        #include "envlock.h"
12
        void __env_lock (void *<[reent]>);
13
        void __env_unlock (void *<[reent]>);
14
 
15
TRAD_SYNOPSIS
16
        void __env_lock(<[reent]>)
17
        char *<[reent]>;
18
 
19
        void __env_unlock(<[reent]>)
20
        char *<[reent]>;
21
 
22
DESCRIPTION
23
The <<stenv>> family of routines call these functions when they need
24
to modify the environ variable.  The version of these routines supplied
25
in the library does not do anything.  If multiple threads of execution
26
can call <<setenv>>, or if <<setenv>> can be called reentrantly, then
27
you need to define your own versions of these functions in order to
28
safely lock the memory pool during a call.  If you do not, the memory
29
pool may become corrupted.
30
 
31
A call to <<setenv>> may call <<__env_lock>> recursively; that is,
32
the sequence of calls may go <<__env_lock>>, <<__env_lock>>,
33
<<__env_unlock>>, <<__env_unlock>>.  Any implementation of these
34
routines must be careful to avoid causing a thread to wait for a lock
35
that it already holds.
36
*/
37
 
38
void
39
__env_lock (ptr)
40
     struct _reent *ptr;
41
{
42
}
43
 
44
void
45
__env_unlock (ptr)
46
     struct _reent *ptr;
47
{
48
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.