Subversion Repositories Kolibri OS

Rev

Rev 4874 | Rev 6536 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4874 Rev 4921
1
/* default reentrant pointer when multithread enabled */
1
/* default reentrant pointer when multithread enabled */
2
 
2
 
3
#include <_ansi.h>
3
#include <_ansi.h>
4
#include 
4
#include 
5
#include 
5
#include 
6
#include 
6
#include 
7
 
7
 
8
 
8
 
9
void init_reent()
9
void init_reent()
10
{
10
{
11
    struct _reent *ent;
11
    struct _reent *ent;
12
 
12
 
13
    ent = user_alloc(sizeof(struct _reent));
13
    ent = user_alloc(sizeof(struct _reent));
14
 
14
 
15
    _REENT_INIT_PTR(ent);
15
    _REENT_INIT_PTR(ent);
16
 
16
 
17
    __asm__ __volatile__(
17
    __asm__ __volatile__(
18
    "movl %0, %%fs:16"
18
    "movl %0, %%fs:16"
19
    ::"r"(ent));
19
    ::"r"(ent));
20
    __sinit(ent);
20
    __sinit(ent);
21
}
21
}
22
-
 
23
-
 
24
-
 
25
-