aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/lib/semaphore.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/lib/semaphore.S')
-rw-r--r--arch/i386/lib/semaphore.S63
1 files changed, 63 insertions, 0 deletions
diff --git a/arch/i386/lib/semaphore.S b/arch/i386/lib/semaphore.S
index e16ff1696390..01f80b5c45d2 100644
--- a/arch/i386/lib/semaphore.S
+++ b/arch/i386/lib/semaphore.S
@@ -152,3 +152,66 @@ ENTRY(__read_lock_failed)
152 END(__read_lock_failed) 152 END(__read_lock_failed)
153 153
154#endif 154#endif
155
156/* Fix up special calling conventions */
157ENTRY(call_rwsem_down_read_failed)
158 CFI_STARTPROC
159 push %ecx
160 CFI_ADJUST_CFA_OFFSET 4
161 CFI_REL_OFFSET ecx,0
162 push %edx
163 CFI_ADJUST_CFA_OFFSET 4
164 CFI_REL_OFFSET edx,0
165 call rwsem_down_read_failed
166 pop %edx
167 CFI_ADJUST_CFA_OFFSET -4
168 pop %ecx
169 CFI_ADJUST_CFA_OFFSET -4
170 ret
171 CFI_ENDPROC
172 END(call_rwsem_down_read_failed)
173
174ENTRY(call_rwsem_down_write_failed)
175 CFI_STARTPROC
176 push %ecx
177 CFI_ADJUST_CFA_OFFSET 4
178 CFI_REL_OFFSET ecx,0
179 calll rwsem_down_write_failed
180 pop %ecx
181 CFI_ADJUST_CFA_OFFSET -4
182 ret
183 CFI_ENDPROC
184 END(call_rwsem_down_write_failed)
185
186ENTRY(call_rwsem_wake)
187 CFI_STARTPROC
188 decw %dx /* do nothing if still outstanding active readers */
189 jnz 1f
190 push %ecx
191 CFI_ADJUST_CFA_OFFSET 4
192 CFI_REL_OFFSET ecx,0
193 call rwsem_wake
194 pop %ecx
195 CFI_ADJUST_CFA_OFFSET -4
1961: ret
197 CFI_ENDPROC
198 END(call_rwsem_wake)
199
200/* Fix up special calling conventions */
201ENTRY(call_rwsem_downgrade_wake)
202 CFI_STARTPROC
203 push %ecx
204 CFI_ADJUST_CFA_OFFSET 4
205 CFI_REL_OFFSET ecx,0
206 push %edx
207 CFI_ADJUST_CFA_OFFSET 4
208 CFI_REL_OFFSET edx,0
209 call rwsem_downgrade_wake
210 pop %edx
211 CFI_ADJUST_CFA_OFFSET -4
212 pop %ecx
213 CFI_ADJUST_CFA_OFFSET -4
214 ret
215 CFI_ENDPROC
216 END(call_rwsem_downgrade_wake)
217