File:  [GnuMach] / Gnu-Mach / linux / src / arch / i386 / lib / semaphore.S
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed Sep 2 04:41:39 2020 UTC (5 years, 10 months ago) by root
Branches: MAIN, GNU
CVS tags: HEAD, GNUMach180, GNUMach170, GNUMach160, GNUMach150, GNUMach140, GNUMach130, GNUMach120
GNU Mach 1.2

/*
 *  linux/arch/i386/lib/semaphore.S
 *
 *  Copyright (C) 1996  Linus Torvalds
 */

#include <linux/linkage.h>

/*
 * "down_failed" is called with the eventual return address
 * in %eax, and the address of the semaphore in %ecx. We need
 * to increment the number of waiters on the semaphore,
 * call "__down()", and then eventually return to try again.
 */
ENTRY(down_failed)
	pushl %eax
	pushl %ecx
	call SYMBOL_NAME(__down)
	popl %ecx
	ret

ENTRY(up_wakeup)
	pushl %eax
	pushl %ecx
	call SYMBOL_NAME(__up)
	popl %ecx
	ret

ENTRY(down_failed_interruptible)
	pushl %eax
	pushl %ecx
	call SYMBOL_NAME(__down_interruptible)
	popl %ecx
	ret


unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.