Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4973 right-hear 1
/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */
2
/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */
3
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
4
#ifndef __dj_include_sys_segments_h_
5
#define __dj_include_sys_segments_h_
6
 
7
#ifdef __cplusplus
8
extern "C" {
9
#endif
10
 
11
#ifndef __dj_ENFORCE_ANSI_FREESTANDING
12
 
13
#ifndef __STRICT_ANSI__
14
 
15
#ifndef _POSIX_SOURCE
16
 
17
static __inline__ int
18
_my_cs(void)
19
{
20
  unsigned short result;
21
  __asm__("movw %%cs,%0" : "=r" (result));
22
  return result;
23
}
24
 
25
static __inline__ int
26
_my_ds(void)
27
{
28
  unsigned short result;
29
  __asm__("movw %%ds,%0" : "=r" (result));
30
  return result;
31
}
32
 
33
static __inline__ int
34
_my_ss(void)
35
{
36
  unsigned short result;
37
  __asm__("movw %%ss,%0" : "=r" (result));
38
  return result;
39
}
40
 
41
#endif /* !_POSIX_SOURCE */
42
#endif /* !__STRICT_ANSI__ */
43
#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
44
 
45
#ifndef __dj_ENFORCE_FUNCTION_CALLS
46
#endif /* !__dj_ENFORCE_FUNCTION_CALLS */
47
 
48
#ifdef __cplusplus
49
}
50
#endif
51
 
52
#endif /* !__dj_include_sys_segment_h_ */