diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/m68knommu/lib/semaphore.S |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'arch/m68knommu/lib/semaphore.S')
-rw-r--r-- | arch/m68knommu/lib/semaphore.S | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/arch/m68knommu/lib/semaphore.S b/arch/m68knommu/lib/semaphore.S new file mode 100644 index 000000000000..76765362fea6 --- /dev/null +++ b/arch/m68knommu/lib/semaphore.S | |||
@@ -0,0 +1,67 @@ | |||
1 | /* | ||
2 | * linux/arch/m68k/lib/semaphore.S | ||
3 | * | ||
4 | * Copyright (C) 1996 Linus Torvalds | ||
5 | * | ||
6 | * m68k version by Andreas Schwab | ||
7 | * | ||
8 | * MAR/1999 -- modified to support ColdFire (gerg@snapgear.com) | ||
9 | */ | ||
10 | |||
11 | #include <linux/linkage.h> | ||
12 | #include <linux/config.h> | ||
13 | #include <asm/semaphore.h> | ||
14 | |||
15 | /* | ||
16 | * "down_failed" is called with the eventual return address | ||
17 | * in %a0, and the address of the semaphore in %a1. We need | ||
18 | * to increment the number of waiters on the semaphore, | ||
19 | * call "__down()", and then eventually return to try again. | ||
20 | */ | ||
21 | ENTRY(__down_failed) | ||
22 | #ifdef CONFIG_COLDFIRE | ||
23 | subl #12,%sp | ||
24 | moveml %a0/%d0/%d1,(%sp) | ||
25 | #else | ||
26 | moveml %a0/%d0/%d1,-(%sp) | ||
27 | #endif | ||
28 | movel %a1,-(%sp) | ||
29 | jbsr __down | ||
30 | movel (%sp)+,%a1 | ||
31 | movel (%sp)+,%d0 | ||
32 | movel (%sp)+,%d1 | ||
33 | rts | ||
34 | |||
35 | ENTRY(__down_failed_interruptible) | ||
36 | movel %a0,-(%sp) | ||
37 | movel %d1,-(%sp) | ||
38 | movel %a1,-(%sp) | ||
39 | jbsr __down_interruptible | ||
40 | movel (%sp)+,%a1 | ||
41 | movel (%sp)+,%d1 | ||
42 | rts | ||
43 | |||
44 | ENTRY(__up_wakeup) | ||
45 | #ifdef CONFIG_COLDFIRE | ||
46 | subl #12,%sp | ||
47 | moveml %a0/%d0/%d1,(%sp) | ||
48 | #else | ||
49 | moveml %a0/%d0/%d1,-(%sp) | ||
50 | #endif | ||
51 | movel %a1,-(%sp) | ||
52 | jbsr __up | ||
53 | movel (%sp)+,%a1 | ||
54 | movel (%sp)+,%d0 | ||
55 | movel (%sp)+,%d1 | ||
56 | rts | ||
57 | |||
58 | ENTRY(__down_failed_trylock) | ||
59 | movel %a0,-(%sp) | ||
60 | movel %d1,-(%sp) | ||
61 | movel %a1,-(%sp) | ||
62 | jbsr __down_trylock | ||
63 | movel (%sp)+,%a1 | ||
64 | movel (%sp)+,%d1 | ||
65 | movel (%sp)+,%a0 | ||
66 | rts | ||
67 | |||