From d4ef8a6368e8e5b22808e3df64306418f1971ba9 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 15 Dec 2014 13:30:07 +0000 Subject: * libgloss/nds32/_exit.S: Finish with an infinite loop in _exit. * libgloss/nds32/_getpid.S: Don't issue _getpid system call, it is always successful. * libgloss/nds32/_gettimeofday.S: No error for _gettimeofday is defined in SYS_geterr handler. * libgloss/nds32/_isatty.S: No error for _isatty is defined in SYS_geterr handler. * libgloss/nds32/_kill.S: Alway fail. errno = EINVAL. * libgloss/nds32/_link.S: Alway fail. errno = EMLINK. * libgloss/nds32/_times.S: Alway fail. errno = EACCES. * libgloss/nds32/_unlink.S: fix copy and paste error. * libgloss/nds32/crt0.S: Add pre_c_init, post_c_init, arg_init. * libgloss/nds32/crt1.S: Add pre_c_init, post_c_init, arg_init. * libgloss/nds32/syscall_extra.h: Re-format. * libgloss/nds32/vh.h: Add more virtual hosting number. --- libgloss/nds32/_kill.S | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'libgloss/nds32/_kill.S') diff --git a/libgloss/nds32/_kill.S b/libgloss/nds32/_kill.S index 69d8b41c6..bb8c6ebd3 100644 --- a/libgloss/nds32/_kill.S +++ b/libgloss/nds32/_kill.S @@ -27,11 +27,20 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#ifndef __NDS32_VH__ - -#include "../syscall.h" -#include "syscall_extra.h" -SYS_WRAPPER _kill, SYS_kill - -#endif /* not __NDS32_VH__ */ +/* Upon successful completion, 0 shall be returned. Otherwise, + -1 shall be returned and errno set to indicate the error. */ + .extern _impure_ptr /* The first element is _errno. */ + .text + .global _kill + .type _kill, @function + .align 2 +_kill: + /* A minimal implementation has no concept of either signals, + nor of processes to receive those signals. So this function + should always fail with an appropriate value in errno. */ + movi $r0, #22 /* EINVAL: Invalid argument */ + l.w $r15, _impure_ptr + swi $r0, [$r15] + movi $r0, -1 /* Set return value to -1. */ + ret + .size _kill, .-_kill -- cgit v1.2.3