4 * Copyright 1995 Alexandre Julliard
7 #ifndef __WINE_SELECTORS_H
8 #define __WINE_SELECTORS_H
13 extern WORD SELECTOR_AllocBlock( const void *base, DWORD size,
14 enum seg_type type, BOOL is32bit,
16 extern WORD SELECTOR_ReallocBlock( WORD sel, const void *base, DWORD size );
17 extern void SELECTOR_MoveBlock( WORD sel, const void *new_base );
18 extern void SELECTOR_FreeBlock( WORD sel, WORD count );
22 # define __DEFINE_GET_SEG(seg) \
23 extern inline unsigned short __get_##seg(void) \
24 { unsigned short res; __asm__("movw %%" #seg ",%w0" : "=r"(res)); return res; }
25 # define __DEFINE_SET_SEG(seg) \
26 extern inline void __set_##seg(int val) { __asm__("movw %w0,%%" #seg : : "r" (val)); }
28 # define __DEFINE_GET_SEG(seg) extern unsigned short __get_##seg(void);
29 # define __DEFINE_SET_SEG(seg) extern void __set_##seg(unsigned int);
30 # endif /* __GNUC__ */
32 # define __DEFINE_GET_SEG(seg) static inline unsigned short __get_##seg(void) { return 0; }
33 # define __DEFINE_SET_SEG(seg) /* nothing */
45 #endif /* __WINE_SELECTORS_H */