source: trunk/src/win32k/kKrnlLib/include/kKLasmutils.h

Last change on this file was 7071, checked in by bird, 24 years ago

Added AtomicSetEqual.

File size: 1.4 KB
Line 
1/* $Id: kKLasmutils.h,v 1.3 2001-10-16 02:21:05 bird Exp $
2 *
3 * Assembly utilities.
4 *
5 * Copyright (c) 1998-2001 knut st. osmundsen (kosmunds@csc.com)
6 *
7 * Project Odin Software License can be found in LICENSE.TXT
8 *
9 */
10#ifndef _asmutils_h_
11#define _asmutils_h_
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17extern unsigned short _System GetCS(void);
18extern unsigned short _System GetDS(void);
19extern unsigned short _System GetES(void);
20extern unsigned short _System GetFS(void);
21extern unsigned short _System GetGS(void);
22extern unsigned short _System GetSS(void);
23
24extern void _System DisableInterrupts(void);
25extern void _System EnableInterrupts(void);
26
27extern unsigned long _Optlink AtomicInc(unsigned long *pul);
28extern unsigned long _Optlink AtomicIncWrap(unsigned long *pul, unsigned long ulMax);
29extern unsigned long _Optlink AtomicDec(unsigned long *pul);
30extern unsigned long _Optlink AtomicSet(unsigned long *pul, unsigned long ul);
31extern unsigned long _Optlink AtomicSetEqual(unsigned long *pul, unsigned long ulSet, unsigned long ulCurrent);
32
33#if 0
34 //extern void _System Int3(void);
35 extern int _System Int3(void);
36#else
37 #include <builtin.h>
38 #define Int3() __interrupt(3)
39#endif
40
41//Negative offsets don't work yet?
42extern void __stdcall memmov(void *p, signed int off, unsigned int len);
43
44#ifdef __cplusplus
45}
46#endif
47#endif
48
Note: See TracBrowser for help on using the repository browser.