Add sem_timedwait to syscalls

This commit is contained in:
Gregory Nutt 2013-12-28 12:04:39 -06:00
parent af40e36466
commit 715177d861
6 changed files with 21 additions and 11 deletions

View file

@ -6330,4 +6330,5 @@
graphics is not properly a part of libc (2013-12-28). graphics is not properly a part of libc (2013-12-28).
* Move graphics/nxfonts to libnx/nxfonts (2013-12-28). * Move graphics/nxfonts to libnx/nxfonts (2013-12-28).
* Move graphics/nxtk to libnx/nxtk (2013-12-28). * Move graphics/nxtk to libnx/nxtk (2013-12-28).
* syscalls: Need to add sem_timedwait() (2013-12-28)

View file

@ -86,15 +86,16 @@
#define SYS_sem_destroy (CONFIG_SYS_RESERVED+14) #define SYS_sem_destroy (CONFIG_SYS_RESERVED+14)
#define SYS_sem_open (CONFIG_SYS_RESERVED+15) #define SYS_sem_open (CONFIG_SYS_RESERVED+15)
#define SYS_sem_post (CONFIG_SYS_RESERVED+16) #define SYS_sem_post (CONFIG_SYS_RESERVED+16)
#define SYS_sem_trywait (CONFIG_SYS_RESERVED+17) #define SYS_sem_timedwait (CONFIG_SYS_RESERVED+17)
#define SYS_sem_unlink (CONFIG_SYS_RESERVED+18) #define SYS_sem_trywait (CONFIG_SYS_RESERVED+18)
#define SYS_sem_wait (CONFIG_SYS_RESERVED+19) #define SYS_sem_unlink (CONFIG_SYS_RESERVED+19)
#define SYS_set_errno (CONFIG_SYS_RESERVED+20) #define SYS_sem_wait (CONFIG_SYS_RESERVED+20)
#define SYS_task_create (CONFIG_SYS_RESERVED+21) #define SYS_set_errno (CONFIG_SYS_RESERVED+21)
#define SYS_task_delete (CONFIG_SYS_RESERVED+22) #define SYS_task_create (CONFIG_SYS_RESERVED+22)
#define SYS_task_restart (CONFIG_SYS_RESERVED+23) #define SYS_task_delete (CONFIG_SYS_RESERVED+23)
#define SYS_up_assert (CONFIG_SYS_RESERVED+24) #define SYS_task_restart (CONFIG_SYS_RESERVED+24)
#define __SYS_vfork (CONFIG_SYS_RESERVED+25) #define SYS_up_assert (CONFIG_SYS_RESERVED+25)
#define __SYS_vfork (CONFIG_SYS_RESERVED+26)
/* The following can be individually enabled */ /* The following can be individually enabled */

View file

@ -92,6 +92,7 @@ void nx_redrawreq(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect)
{ {
FAR struct nxbe_window_s *wnd = (FAR struct nxbe_window_s *)hwnd; FAR struct nxbe_window_s *wnd = (FAR struct nxbe_window_s *)hwnd;
struct nxsvrmsg_redrawreq_s outmsg; struct nxsvrmsg_redrawreq_s outmsg;
int ret;
#ifdef CONFIG_DEBUG #ifdef CONFIG_DEBUG
if (!wnd || !rect) if (!wnd || !rect)
@ -107,5 +108,9 @@ void nx_redrawreq(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect)
outmsg.wnd = wnd; outmsg.wnd = wnd;
nxgl_rectcopy(&outmsg.rect, rect); nxgl_rectcopy(&outmsg.rect, rect);
return nxmu_sendwindow(wnd, &outmsg, sizeof(struct nxsvrmsg_redrawreq_s)); ret = nxmu_sendwindow(wnd, &outmsg, sizeof(struct nxsvrmsg_redrawreq_s));
if (ret < 0)
{
gdbg("ERROR: nxmu_sendwindow failed: %d\n", errno);
}
} }

View file

@ -103,6 +103,7 @@
"sem_destroy","semaphore.h","","int","FAR sem_t*" "sem_destroy","semaphore.h","","int","FAR sem_t*"
"sem_open","semaphore.h","","FAR sem_t*","FAR const char*","int","..." "sem_open","semaphore.h","","FAR sem_t*","FAR const char*","int","..."
"sem_post","semaphore.h","","int","FAR sem_t*" "sem_post","semaphore.h","","int","FAR sem_t*"
"sem_timedwait","semaphore.h","","int","FAR sem_t*","FAR const struct timespec *"
"sem_trywait","semaphore.h","","int","FAR sem_t*" "sem_trywait","semaphore.h","","int","FAR sem_t*"
"sem_unlink","semaphore.h","","int","FAR const char*" "sem_unlink","semaphore.h","","int","FAR const char*"
"sem_wait","semaphore.h","","int","FAR sem_t*" "sem_wait","semaphore.h","","int","FAR sem_t*"

Can't render this file because it has a wrong number of fields in line 2.

View file

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* syscall/syscall_lookup.h * syscall/syscall_lookup.h
* *
* Copyright (C) 2011 Gregory Nutt. All rights reserved. * Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -60,6 +60,7 @@ SYSCALL_LOOKUP(sem_close, 1, STUB_sem_close)
SYSCALL_LOOKUP(sem_destroy, 2, STUB_sem_destroy) SYSCALL_LOOKUP(sem_destroy, 2, STUB_sem_destroy)
SYSCALL_LOOKUP(sem_open, 6, STUB_sem_open) SYSCALL_LOOKUP(sem_open, 6, STUB_sem_open)
SYSCALL_LOOKUP(sem_post, 1, STUB_sem_post) SYSCALL_LOOKUP(sem_post, 1, STUB_sem_post)
SYSCALL_LOOKUP(sem_timedwait, 2, STUB_sem_timedwait)
SYSCALL_LOOKUP(sem_trywait, 1, STUB_sem_trywait) SYSCALL_LOOKUP(sem_trywait, 1, STUB_sem_trywait)
SYSCALL_LOOKUP(sem_unlink, 1, STUB_sem_unlink) SYSCALL_LOOKUP(sem_unlink, 1, STUB_sem_unlink)
SYSCALL_LOOKUP(sem_wait, 1, STUB_sem_wait) SYSCALL_LOOKUP(sem_wait, 1, STUB_sem_wait)

View file

@ -80,6 +80,7 @@ uintptr_t STUB_sem_destroy(int nbr, uintptr_t parm1);
uintptr_t STUB_sem_open(int nbr, uintptr_t parm1, uintptr_t parm2, uintptr_t STUB_sem_open(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4, uintptr_t parm5, uintptr_t parm6); uintptr_t parm3, uintptr_t parm4, uintptr_t parm5, uintptr_t parm6);
uintptr_t STUB_sem_post(int nbr, uintptr_t parm1); uintptr_t STUB_sem_post(int nbr, uintptr_t parm1);
uintptr_t STUB_sem_timedwait(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_sem_trywait(int nbr, uintptr_t parm1); uintptr_t STUB_sem_trywait(int nbr, uintptr_t parm1);
uintptr_t STUB_sem_unlink(int nbr, uintptr_t parm1); uintptr_t STUB_sem_unlink(int nbr, uintptr_t parm1);
uintptr_t STUB_sem_wait(int nbr, uintptr_t parm1); uintptr_t STUB_sem_wait(int nbr, uintptr_t parm1);