Subversion Repositories Kolibri OS

Rev

Rev 3593 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3593 Rev 3805
Line 1... Line 1...
1
/* default reentrant pointer when multithread enabled */
1
/* default reentrant pointer when multithread enabled */
Line 2... Line 2...
2
 
2
 
3
#include <_ansi.h>
3
#include <_ansi.h>
4
#include 
4
#include 
-
 
5
#include 
Line 5... Line -...
5
#include 
-
 
6
 
-
 
7
static inline
-
 
8
void *user_alloc(int size)
-
 
9
{
-
 
10
    void  *val;
-
 
11
    __asm__ __volatile__(
-
 
12
    "int $0x40"
-
 
13
    :"=eax"(val)
-
 
14
    :"a"(68),"b"(12),"c"(size));
-
 
Line 15... Line 6...
15
    return val;
6
#include 
16
}
7
 
17
 
8
 
Line 18... Line 9...
18
void init_reent()
9
void init_reent()
Line 19... Line 10...
19
{
10
{
Line 20... Line 11...
20
    struct _reent *ent;
11
    struct _reent *ent;
21
 
12
 
22
    ent = user_alloc(sizeof(struct _reent));
13
    ent = user_alloc(sizeof(struct _reent));
23
 
14
 
24
    _REENT_INIT_PTR(ent);
15
    _REENT_INIT_PTR(ent);