forked from nuttx/nuttx-update
Add SYSCALLS for pthread_setaffinity() and pthread_getaffinity()
This commit is contained in:
parent
1b5e296cf2
commit
5a590e99b9
6 changed files with 31 additions and 16 deletions
|
@ -1,7 +1,7 @@
|
|||
/********************************************************************************
|
||||
* include/pthread.h
|
||||
*
|
||||
* Copyright (C) 2007-2009, 2011-2012, 2015 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009, 2011-2012, 2015-2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -259,14 +259,10 @@ typedef struct pthread_barrier_s pthread_barrier_t;
|
|||
typedef bool pthread_once_t;
|
||||
#define __PTHREAD_ONCE_T_DEFINED 1
|
||||
|
||||
/* Forware references */
|
||||
/* Forward references */
|
||||
|
||||
struct sched_param; /* Defined in sched.h */
|
||||
|
||||
/********************************************************************************
|
||||
* Public Data
|
||||
********************************************************************************/
|
||||
|
||||
/********************************************************************************
|
||||
* Public Function Prototypes
|
||||
********************************************************************************/
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* include/sys/syscall.h
|
||||
* This file contains the system call numbers.
|
||||
*
|
||||
* Copyright (C) 2011-2014 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2011-2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -377,13 +377,21 @@
|
|||
# define SYS_pthread_setspecific (__SYS_pthread+26)
|
||||
# define SYS_pthread_yield (__SYS_pthread+27)
|
||||
|
||||
# ifndef CONFIG_DISABLE_SIGNALS
|
||||
# define SYS_pthread_cond_timedwait (__SYS_pthread+28)
|
||||
# define SYS_pthread_kill (__SYS_pthread+29)
|
||||
# define SYS_pthread_sigmask (__SYS_pthread+30)
|
||||
# define __SYS_mqueue (__SYS_pthread+31)
|
||||
# ifndef CONFIG_SMP
|
||||
# define SYS_pthread_setaffinity_np (__SYS_pthread+28)
|
||||
# define SYS_pthread_getaffinity_np (__SYS_pthread+29)
|
||||
# define __SYS_pthread_signals (__SYS_pthread+30)
|
||||
# else
|
||||
# define __SYS_mqueue (__SYS_pthread+28)
|
||||
# define __SYS_pthread_signals (__SYS_pthread+28)
|
||||
# endif
|
||||
|
||||
# ifndef CONFIG_DISABLE_SIGNALS
|
||||
# define SYS_pthread_cond_timedwait (__SYS_pthread_signals+0)
|
||||
# define SYS_pthread_kill (__SYS_pthread_signals+1)
|
||||
# define SYS_pthread_sigmask (__SYS_pthread_signals+2)
|
||||
# define __SYS_mqueue (__SYS_pthread_signals+3)
|
||||
# else
|
||||
# define __SYS_mqueue __SYS_pthread_signals
|
||||
# endif
|
||||
|
||||
#else
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
############################################################################
|
||||
# sched/pthread/Make.defs
|
||||
#
|
||||
# Copyright (C) 2014 Gregory Nutt. All rights reserved.
|
||||
# Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -72,6 +72,7 @@
|
|||
"pthread_create","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_t*","FAR const pthread_attr_t*","pthread_startroutine_t","pthread_addr_t"
|
||||
"pthread_detach","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","pthread_t"
|
||||
"pthread_exit","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","void","pthread_addr_t"
|
||||
"pthread_getaffinity_np","pthread.h","!defined(CONFIG_DISABLE_PTHREAD) && defined(CONFIG_SMP)","int","pthread_t","size_t","FAR cpu_set_t*"
|
||||
"pthread_getschedparam","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","pthread_t","FAR int*","FAR struct sched_param*"
|
||||
"pthread_getspecific","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","FAR void*","pthread_key_t"
|
||||
"pthread_join","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","pthread_t","FAR pthread_addr_t*"
|
||||
|
@ -84,6 +85,7 @@
|
|||
"pthread_mutex_trylock","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_mutex_t*"
|
||||
"pthread_mutex_unlock","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_mutex_t*"
|
||||
"pthread_once","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_once_t*","CODE void (*)(void)"
|
||||
"pthread_setaffinity_np","pthread.h","!defined(CONFIG_DISABLE_PTHREAD) && defined(CONFIG_SMP)","int","pthread_t","size_t","FAR const cpu_set_t*"
|
||||
"pthread_setcancelstate","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","int","FAR int*"
|
||||
"pthread_setschedparam","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","pthread_t","int","FAR const struct sched_param*"
|
||||
"pthread_setschedprio","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","pthread_t","int"
|
||||
|
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
@ -1,7 +1,7 @@
|
|||
/****************************************************************************
|
||||
* syscall/syscall_lookup.h
|
||||
*
|
||||
* Copyright (C) 2011, 2013-2014 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2011, 2013-2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -278,6 +278,10 @@ SYSCALL_LOOKUP(up_assert, 2, STUB_up_assert)
|
|||
SYSCALL_LOOKUP(pthread_setschedprio, 2, STUB_pthread_setschedprio)
|
||||
SYSCALL_LOOKUP(pthread_setspecific, 2, STUB_pthread_setspecific)
|
||||
SYSCALL_LOOKUP(pthread_yield, 0, STUB_pthread_yield)
|
||||
# ifdef CONFIG_SMP
|
||||
SYSCALL_LOOKUP(pthread_setaffinity, 3, STUB_pthread_setaffinity)
|
||||
SYSCALL_LOOKUP(pthread_getaffinity, 3, STUB_pthread_getaffinity)
|
||||
# endif
|
||||
# ifndef CONFIG_DISABLE_SIGNALS
|
||||
SYSCALL_LOOKUP(pthread_cond_timedwait, 3, STUB_pthread_cond_timedwait)
|
||||
SYSCALL_LOOKUP(pthread_kill, 2, STUB_pthread_kill)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/****************************************************************************
|
||||
* syscall/syscall_stublookup.c
|
||||
*
|
||||
* Copyright (C) 2011-2013 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2011-2013, 2015-2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -290,6 +290,11 @@ uintptr_t STUB_pthread_setspecific(int nbr, uintptr_t parm1,
|
|||
uintptr_t parm2);
|
||||
uintptr_t STUB_pthread_yield(int nbr);
|
||||
|
||||
uintptr_t STUB_pthread_setaffinity(int nbr, uintptr_t parm1,
|
||||
uintptr_t parm2, uintptr_t parm3);
|
||||
uintptr_t STUB_pthread_getaffinity(int nbr, uintptr_t parm1,
|
||||
uintptr_t parm2, uintptr_t parm3);
|
||||
|
||||
uintptr_t STUB_pthread_cond_timedwait(int nbr, uintptr_t parm1,
|
||||
uintptr_t parm2, uintptr_t parm3);
|
||||
uintptr_t STUB_pthread_kill(int nbr, uintptr_t parm1, uintptr_t parm2);
|
||||
|
|
Loading…
Reference in a new issue