Rev 1693 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1693 | Rev 1906 | ||
---|---|---|---|
Line 2... | Line 2... | ||
2 | 2 | ||
3 | #include <_ansi.h> |
3 | #include <_ansi.h> |
4 | #include |
4 | #include |
Line 5... | Line -... | ||
5 | #include |
- | |
6 | - | ||
7 | #ifdef __getreent |
- | |
8 | #undef __getreent |
- | |
9 | #endif |
5 | #include |
10 | 6 | ||
11 | static inline |
7 | static inline |
12 | void *user_alloc(int size) |
8 | void *user_alloc(int size) |
13 | { |
9 | { |
Line 26... | Line 22... | ||
26 | ent = user_alloc(sizeof(struct _reent)); |
22 | ent = user_alloc(sizeof(struct _reent)); |
Line 27... | Line 23... | ||
27 | 23 | ||
Line 28... | Line 24... | ||
28 | _REENT_INIT_PTR(ent); |
24 | _REENT_INIT_PTR(ent); |
29 | 25 | ||
30 | __asm__ __volatile__( |
26 | __asm__ __volatile__( |
31 | "movl %0, %%fs:0" |
27 | "movl %0, %%fs:12" |
32 | ::"r"(ent)); |
28 | ::"r"(ent)); |
Line 33... | Line -... | ||
33 | __sinit(ent); |
- | |
34 | } |
- | |
35 | - | ||
36 | struct _reent * |
- | |
Line 37... | Line -... | ||
37 | _DEFUN_VOID(__getreent) |
- | |
38 | { |
- | |
39 | struct _reent *ent; |
- | |
40 | - | ||
41 | __asm__ __volatile__( |
- | |
Line 42... | Line 29... | ||
42 | "movl %%fs:0, %0" |
29 | __sinit(ent); |
43 | :"=r"(ent)); |
30 | } |
44 | return ent; |
31 |