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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib-1.10.0/] [newlib/] [libc/] [stdlib/] [mlock.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
<<__malloc_lock>>, <<__malloc_unlock>>--lock malloc pool
4
 
5
INDEX
6
        __malloc_lock
7
INDEX
8
        __malloc_unlock
9
 
10
ANSI_SYNOPSIS
11
        #include <malloc.h>
12
        void __malloc_lock (struct _reent *<[reent]>);
13
        void __malloc_unlock (struct _reent *<[reent]>);
14
 
15
TRAD_SYNOPSIS
16
        void __malloc_lock(<[reent]>)
17
        struct _reent *<[reent]>;
18
 
19
        void __malloc_unlock(<[reent]>)
20
        struct _reent *<[reent]>;
21
 
22
DESCRIPTION
23
The <<malloc>> family of routines call these functions when they need
24
to lock the memory pool.  The version of these routines supplied in
25
the library does not do anything.  If multiple threads of execution
26
can call <<malloc>>, or if <<malloc>> 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 <<malloc>> may call <<__malloc_lock>> recursively; that is,
32
the sequence of calls may go <<__malloc_lock>>, <<__malloc_lock>>,
33
<<__malloc_unlock>>, <<__malloc_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 <malloc.h>
39
 
40
void
41
__malloc_lock (ptr)
42
     struct _reent *ptr;
43
{
44
}
45
 
46
void
47
__malloc_unlock (ptr)
48
     struct _reent *ptr;
49
{
50
}

powered by: WebSVN 2.1.0

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