⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 scout_synch.h

📁 java 到c的转换程序的原代码.对喜欢C程序而不懂JAVA程序的人很有帮助
💻 H
字号:
#ifndef __x86_synch_h__#define __x86_synch_h__#ifndef LANGUAGE_ASSEMBLY#ifndef USER_LEVELextern inline longsynchEnableInterrupts (void){    register long result;    asm volatile ("pushfl ;		   popl %0 ;		   sti"		  : "r="(result)		  : );    return result;}extern inline longsynchDisableInterrupts (void){    register long result;    asm volatile (" ;		   pushfl ;		   popl %0 ;		   cli ;"		  : "r="(result)		  : );    return result;}extern inline voidsynchRestoreInterrupts (long flags){    asm volatile ("pushl %0;		   popfl ; "		  :		  : "r"(flags)		  : "cc");}#endif /* USER_LEVEL */#define synchAtomicSequence(as)						\({									\    register long as_flags;						\    as_flags = synchDisableInterrupts();				\    {as;}								\    synchRestoreInterrupts(as_flags);					\})#endif /* LANGUAGE_ASSEMBLY */#endif /* __x86_synch_h__ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -