diff options
author | Maxim Kuvyrkov <maxim@codesourcery.com> | 2009-12-06 13:08:14 -0500 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2010-02-27 12:35:22 -0500 |
commit | a58f75349063f60949614de39390df594ba1418d (patch) | |
tree | b0fec4508132df99cfa81e5d9f080028fe234b91 /arch/m68knommu/kernel/sys_m68k.c | |
parent | 9674cdc74d63f346870943ef966a034f8c71ee57 (diff) |
m68knommu: NPTL support for uClinux
Port syscalls for NPTL support to m68knommu.
Signed-off-by: Maxim Kuvyrkov <maxim@codesourcery.com>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68knommu/kernel/sys_m68k.c')
-rw-r--r-- | arch/m68knommu/kernel/sys_m68k.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/m68knommu/kernel/sys_m68k.c b/arch/m68knommu/kernel/sys_m68k.c index b67cbc735a9b..923dd4aab875 100644 --- a/arch/m68knommu/kernel/sys_m68k.c +++ b/arch/m68knommu/kernel/sys_m68k.c | |||
@@ -190,3 +190,39 @@ int kernel_execve(const char *filename, char *const argv[], char *const envp[]) | |||
190 | : "d" (__a), "d" (__b), "d" (__c)); | 190 | : "d" (__a), "d" (__b), "d" (__c)); |
191 | return __res; | 191 | return __res; |
192 | } | 192 | } |
193 | |||
194 | asmlinkage unsigned long sys_get_thread_area(void) | ||
195 | { | ||
196 | return current_thread_info()->tp_value; | ||
197 | } | ||
198 | |||
199 | asmlinkage int sys_set_thread_area(unsigned long tp) | ||
200 | { | ||
201 | current_thread_info()->tp_value = tp; | ||
202 | return 0; | ||
203 | } | ||
204 | |||
205 | /* This syscall gets its arguments in A0 (mem), D2 (oldval) and | ||
206 | D1 (newval). */ | ||
207 | asmlinkage int | ||
208 | sys_atomic_cmpxchg_32(unsigned long newval, int oldval, int d3, int d4, int d5, | ||
209 | unsigned long __user * mem) | ||
210 | { | ||
211 | struct mm_struct *mm = current->mm; | ||
212 | unsigned long mem_value; | ||
213 | |||
214 | down_read(&mm->mmap_sem); | ||
215 | |||
216 | mem_value = *mem; | ||
217 | if (mem_value == oldval) | ||
218 | *mem = newval; | ||
219 | |||
220 | up_read(&mm->mmap_sem); | ||
221 | return mem_value; | ||
222 | } | ||
223 | |||
224 | asmlinkage int sys_atomic_barrier(void) | ||
225 | { | ||
226 | /* no code needed for uniprocs */ | ||
227 | return 0; | ||
228 | } | ||