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

Subversion Repositories or1k

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

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

Line No. Rev Author Line
1 1010 ivang
/*
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 (struct _reent *<[reent]>);
13
       void __env_unlock (struct _reent *<[reent]>);
14
 
15
TRAD_SYNOPSIS
16
        void __env_lock(<[reent]>)
17
       struct _reent *<[reent]>;
18
 
19
        void __env_unlock(<[reent]>)
20
       struct _reent *<[reent]>;
21
 
22
DESCRIPTION
23
The <<setenv>> 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
#include "envlock.h"
39
 
40
 
41
void
42
__env_lock (ptr)
43
     struct _reent *ptr;
44
{
45
}
46
 
47
void
48
__env_unlock (ptr)
49
     struct _reent *ptr;
50
{
51
}

powered by: WebSVN 2.1.0

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