From 51349317457d45038d68464a02e8ccd6a5d4ca8d Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 9 Mar 2011 12:20:28 +0100 Subject: bits/kernel_stat.h: use the same guard on all archs Signed-off-by: Peter S. Mazinger --- libc/sysdeps/linux/cris/bits/kernel_stat.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libc/sysdeps/linux/cris') diff --git a/libc/sysdeps/linux/cris/bits/kernel_stat.h b/libc/sysdeps/linux/cris/bits/kernel_stat.h index b54f29210..ce22730fb 100644 --- a/libc/sysdeps/linux/cris/bits/kernel_stat.h +++ b/libc/sysdeps/linux/cris/bits/kernel_stat.h @@ -1,7 +1,7 @@ /* Taken from linux/include/asm-cris/stat.h */ -#ifndef _CRIS_STAT_H -#define _CRIS_STAT_H +#ifndef _BITS_STAT_STRUCT_H +#define _BITS_STAT_STRUCT_H #ifndef _LIBC #error bits/kernel_stat.h is for internal uClibc use only! -- cgit v1.2.3 From 41647059ec1945a258a9ee26638a1c0e4d181eaa Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 9 Mar 2011 12:31:15 +0100 Subject: bits/kernel_stat.h: no need for _LIBC guard, the file is not installed on target Signed-off-by: Peter S. Mazinger --- libc/sysdeps/linux/cris/bits/kernel_stat.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'libc/sysdeps/linux/cris') diff --git a/libc/sysdeps/linux/cris/bits/kernel_stat.h b/libc/sysdeps/linux/cris/bits/kernel_stat.h index ce22730fb..619f35e9e 100644 --- a/libc/sysdeps/linux/cris/bits/kernel_stat.h +++ b/libc/sysdeps/linux/cris/bits/kernel_stat.h @@ -3,10 +3,6 @@ #ifndef _BITS_STAT_STRUCT_H #define _BITS_STAT_STRUCT_H -#ifndef _LIBC -#error bits/kernel_stat.h is for internal uClibc use only! -#endif - struct kernel_stat { unsigned short st_dev; unsigned short __pad1; -- cgit v1.2.3 From 9b5df2295b4a3cfc63a15b6490f2b61dcf7c1be9 Mon Sep 17 00:00:00 2001 From: Thorsten Glaser Date: Sat, 26 Mar 2011 15:11:51 +0000 Subject: cris: add provide arch-specific vfork implementation vfork must be called with nothing at all on the stack, so implementing it via syscall() does not work. Signed-off-by: Thorsten Glaser Signed-off-by: Waldemar Brodkorb Signed-off-by: Mike Frysinger --- libc/sysdeps/linux/cris/Makefile.arch | 2 +- libc/sysdeps/linux/cris/vfork.S | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 libc/sysdeps/linux/cris/vfork.S (limited to 'libc/sysdeps/linux/cris') diff --git a/libc/sysdeps/linux/cris/Makefile.arch b/libc/sysdeps/linux/cris/Makefile.arch index 43e191205..8a682b0b6 100644 --- a/libc/sysdeps/linux/cris/Makefile.arch +++ b/libc/sysdeps/linux/cris/Makefile.arch @@ -7,7 +7,7 @@ CSRC := __init_brk.c brk.c sbrk.c -SSRC := setjmp.S __longjmp.S clone.S sysdep.S syscall.S +SSRC := setjmp.S __longjmp.S clone.S sysdep.S syscall.S vfork.S ifeq ($(UNIFIED_SYSCALL),y) SSRC += __uClibc_syscall.S endif diff --git a/libc/sysdeps/linux/cris/vfork.S b/libc/sysdeps/linux/cris/vfork.S new file mode 100644 index 000000000..ea8a81d82 --- /dev/null +++ b/libc/sysdeps/linux/cris/vfork.S @@ -0,0 +1,30 @@ +/*- + * Copyright (c) 2011 + * Thorsten Glaser + * + * This file is available either under the terms and conditions of + * the MirOS Licence, or the same terms as klibc or uClibc. + */ + +#include "sysdep.h" + + .syntax no_register_prefix + +/* + * vfork is special, but PSEUDO() would probably work were it not broken; + * there must be nothing at all on the stack above the stack frame of the + * enclosing function + */ + +ENTRY(__vfork) + movu.w __NR_vfork,$r9 + break 13 + cmps.w -4096,$r10 + bhs 0f + nop + Ret + nop +PSEUDO_END(__vfork) + +weak_alias(__vfork,vfork) +libc_hidden_weak(vfork) -- cgit v1.2.3