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

📄 semaphore.s

📁 基于组件方式开发操作系统的OSKIT源代码
💻 S
字号:
/* *  linux/arch/i386/lib/semaphore.S * *  Copyright (C) 1996  Linus Torvalds */#include <linux/linkage.h>/* * The semaphore operations have a special calling sequence that * allow us to do a simpler in-line version of them. These routines * need to convert that sequence back into the C sequence when * there is contention on the semaphore. */ENTRY(__down_failed)	pushl %eax	/* save %eax */	pushl %edx	/* save %edx */	pushl %ecx	/* save %ecx (and argument) */	call SYMBOL_NAME(__down)	popl %ecx	/* restore %ecx (count on __down not changing it) */	popl %edx	/* restore %edx */	popl %eax	/* restore %eax */	retENTRY(__up_wakeup)	pushl %eax	/* save %eax */	pushl %edx	/* save %edx */	pushl %ecx	/* save %ecx (and argument) */	call SYMBOL_NAME(__up)	popl %ecx	/* restore %ecx (count on __up not changing it) */	popl %edx	/* restore %edx */	popl %eax	/* restore %eax */	ret

⌨️ 快捷键说明

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