You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gu...@apache.org on 2021/12/29 11:11:16 UTC

[incubator-nuttx] branch master updated (901361b -> a698100)

This is an automated email from the ASF dual-hosted git repository.

gustavonihei pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.


    from 901361b  arch/risc-v: Move more files to common
     new a010cb1  serial: Make SIGINT and SIGTSTP work even without CONFIG_SERIAL_TERMIOS
     new 8668410  serial: Move tcdrain implementation from drivers/serial to libc
     new 077a28e  Fix termios/lib_cfspeed.c:78:5: error: large integer implicitly truncated to unsigned type
     new 228442e  arch/renesas: Undefine macro B0 to avoid the confliction
     new 4262b09  libc: Implement terminal api regardless of CONFIG_SERIAL_TERMIOS setting
     new 965f764  sched: Remove the condition guard from getppid prototype
     new a698100  sched: Remove the condition guard from environ macro

The 7 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 arch/renesas/include/rx65n/iodefine.h              |  2 +
 drivers/serial/Kconfig                             |  2 -
 drivers/serial/Make.defs                           |  6 --
 drivers/serial/serial.c                            | 38 +++++++---
 drivers/serial/tcdrain.c                           | 86 ----------------------
 include/cxx/cunistd                                |  2 -
 include/nuttx/serial/serial.h                      | 11 ++-
 include/stdlib.h                                   |  4 +-
 include/sys/syscall_lookup.h                       |  3 -
 include/termios.h                                  |  5 +-
 include/unistd.h                                   |  4 -
 libs/libc/termios/Make.defs                        |  6 +-
 libs/libc/termios/{lib_tcflush.c => lib_tcdrain.c} | 11 ++-
 libs/libc/termios/lib_tcgetattr.c                  |  2 +-
 libs/libc/termios/lib_tcsetattr.c                  |  2 +-
 syscall/syscall.csv                                |  1 -
 16 files changed, 46 insertions(+), 139 deletions(-)
 delete mode 100644 drivers/serial/tcdrain.c
 copy libs/libc/termios/{lib_tcflush.c => lib_tcdrain.c} (89%)

[incubator-nuttx] 05/07: libc: Implement terminal api regardless of CONFIG_SERIAL_TERMIOS setting

Posted by gu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gustavonihei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 4262b09cbf08a6721515531263f28fbd21e547d5
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Fri Dec 17 02:58:49 2021 +0800

    libc: Implement terminal api regardless of CONFIG_SERIAL_TERMIOS setting
    
    since many functions aren't related to termios directly
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 drivers/serial/serial.c           | 2 --
 include/cxx/cunistd               | 2 --
 include/nuttx/serial/serial.h     | 4 +---
 include/termios.h                 | 3 ---
 include/unistd.h                  | 2 --
 libs/libc/termios/Make.defs       | 4 ----
 libs/libc/termios/lib_tcgetattr.c | 2 +-
 libs/libc/termios/lib_tcsetattr.c | 2 +-
 8 files changed, 3 insertions(+), 18 deletions(-)

diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index d9e71bb..f02316b 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -1354,7 +1354,6 @@ static int uart_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
             }
             break;
 
-#ifdef CONFIG_SERIAL_TERMIOS
           case TCFLSH:
             {
               /* Empty the tx/rx buffers */
@@ -1391,7 +1390,6 @@ static int uart_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
               ret = uart_tcdrain(dev, true, 10 * TICK_PER_SEC);
             }
             break;
-#endif
 
 #if defined(CONFIG_TTY_SIGINT) || defined(CONFIG_TTY_SIGTSTP)
           /* Make the controlling terminal of the calling process */
diff --git a/include/cxx/cunistd b/include/cxx/cunistd
index 42ae125..91fd625 100644
--- a/include/cxx/cunistd
+++ b/include/cxx/cunistd
@@ -56,9 +56,7 @@ namespace std
 
   // Terminal I/O
 
-#ifdef CONFIG_SERIAL_TERMIOS
   using ::isatty;
-#endif
 
   // Memory management
 
diff --git a/include/nuttx/serial/serial.h b/include/nuttx/serial/serial.h
index 6645da5..d5aa793 100644
--- a/include/nuttx/serial/serial.h
+++ b/include/nuttx/serial/serial.h
@@ -31,9 +31,7 @@
 #include <stdint.h>
 #include <stdbool.h>
 #include <errno.h>
-#ifdef CONFIG_SERIAL_TERMIOS
-#  include <termios.h>
-#endif
+#include <termios.h>
 
 #include <nuttx/fs/fs.h>
 #include <nuttx/semaphore.h>
diff --git a/include/termios.h b/include/termios.h
index 924c88c..a966724 100644
--- a/include/termios.h
+++ b/include/termios.h
@@ -29,8 +29,6 @@
 #include <sys/types.h>
 #include <stdint.h>
 
-#ifdef CONFIG_SERIAL_TERMIOS
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
@@ -319,5 +317,4 @@ int tcsetattr(int fd, int options, FAR const struct termios *termiosp);
 }
 #endif
 
-#endif /* CONFIG_SERIAL_TERMIOS */
 #endif /* __INCLUDE_TERMIOS_H */
diff --git a/include/unistd.h b/include/unistd.h
index 63e5cdd..d6092e1 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -327,14 +327,12 @@ ssize_t pwrite(int fd, FAR const void *buf, size_t nbytes, off_t offset);
 int     ftruncate(int fd, off_t length);
 int     fchown(int fd, uid_t owner, gid_t group);
 
-#ifdef CONFIG_SERIAL_TERMIOS
 /* Check if a file descriptor corresponds to a terminal I/O file */
 
 int     isatty(int fd);
 
 FAR char *ttyname(int fd);
 int       ttyname_r(int fd, FAR char *buf, size_t buflen);
-#endif
 
 /* Memory management */
 
diff --git a/libs/libc/termios/Make.defs b/libs/libc/termios/Make.defs
index 974bc06..ec44a79 100644
--- a/libs/libc/termios/Make.defs
+++ b/libs/libc/termios/Make.defs
@@ -21,8 +21,6 @@
 # termios.h support requires file descriptors and that CONFIG_SERIAL_TERMIOS
 # is defined
 
-ifeq ($(CONFIG_SERIAL_TERMIOS),y)
-
 # Add the termios C files to the build
 
 CSRCS += lib_cfspeed.c lib_cfmakeraw.c lib_isatty.c lib_tcflush.c
@@ -33,5 +31,3 @@ CSRCS += lib_ttyname.c lib_ttynamer.c
 
 DEPPATH += --dep-path termios
 VPATH += termios
-
-endif
diff --git a/libs/libc/termios/lib_tcgetattr.c b/libs/libc/termios/lib_tcgetattr.c
index 61dae53..a1bbcdc 100644
--- a/libs/libc/termios/lib_tcgetattr.c
+++ b/libs/libc/termios/lib_tcgetattr.c
@@ -60,5 +60,5 @@
 
 int tcgetattr(int fd, FAR struct termios *termiosp)
 {
-  return ioctl(fd, TCGETS, (unsigned long)termiosp);
+  return ioctl(fd, TCGETS, (unsigned long)(uintptr_t)termiosp);
 }
diff --git a/libs/libc/termios/lib_tcsetattr.c b/libs/libc/termios/lib_tcsetattr.c
index cde1c06..8142087 100644
--- a/libs/libc/termios/lib_tcsetattr.c
+++ b/libs/libc/termios/lib_tcsetattr.c
@@ -93,5 +93,5 @@ int tcsetattr(int fd, int options, FAR const struct termios *termiosp)
       tcflush(fd, TCIFLUSH);
     }
 
-  return ioctl(fd, TCSETS, (unsigned long)termiosp);
+  return ioctl(fd, TCSETS, (unsigned long)(uintptr_t)termiosp);
 }

[incubator-nuttx] 03/07: Fix termios/lib_cfspeed.c:78:5: error: large integer implicitly truncated to unsigned type

Posted by gu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gustavonihei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 077a28eff6930350f7037d271b69711a20217db4
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Fri Dec 17 17:19:43 2021 +0800

    Fix termios/lib_cfspeed.c:78:5: error: large integer implicitly truncated to unsigned type
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 include/termios.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/termios.h b/include/termios.h
index f2fb090..924c88c 100644
--- a/include/termios.h
+++ b/include/termios.h
@@ -217,7 +217,7 @@
 
 /* Baud rate selection */
 
-typedef unsigned int  speed_t;   /* Used for terminal baud rates */
+typedef unsigned long speed_t;   /* Used for terminal baud rates */
 
 /* Types used within the termios structure */
 

[incubator-nuttx] 07/07: sched: Remove the condition guard from environ macro

Posted by gu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gustavonihei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit a698100de320ae0e68548b9b1deb90431482db96
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Dec 19 17:24:25 2021 +0800

    sched: Remove the condition guard from environ macro
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 include/stdlib.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/include/stdlib.h b/include/stdlib.h
index 690ac4c..81e9396 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -62,9 +62,7 @@
  * function call.  However, get_environ_ptr() can be used in its place.
  */
 
-#ifndef CONFIG_DISABLE_ENVIRON
-#  define environ get_environ_ptr()
-#endif
+#define environ get_environ_ptr()
 
 #if defined(CONFIG_FS_LARGEFILE) && defined(CONFIG_HAVE_LONG_LONG)
 #  define mkstemp64            mkstemp

[incubator-nuttx] 01/07: serial: Make SIGINT and SIGTSTP work even without CONFIG_SERIAL_TERMIOS

Posted by gu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gustavonihei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit a010cb1af1d1e49e6e4ae15f724de96a50bdeeb5
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Fri Dec 17 22:03:10 2021 +0800

    serial: Make SIGINT and SIGTSTP work even without CONFIG_SERIAL_TERMIOS
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 drivers/serial/Kconfig        | 2 --
 drivers/serial/serial.c       | 6 +++---
 include/nuttx/serial/serial.h | 7 ++++---
 3 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index b63ca0a..0a2f7ad 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -191,7 +191,6 @@ config TTY_FORCE_PANIC_CHAR
 config TTY_SIGINT
 	bool "Support SIGINT"
 	default n
-	depends on SERIAL_TERMIOS
 	---help---
 		Whether support Ctrl-c/x event.  Enabled automatically for console
 		devices.  May be enabled for other serial devices using the ISIG bit
@@ -235,7 +234,6 @@ config TTY_SIGINT_CHAR
 config TTY_SIGTSTP
 	bool "Support SIGTSTP"
 	default n
-	depends on SERIAL_TERMIOS
 	---help---
 		Whether support Ctrl-z event.  Enabled automatically for console
 		devices.  May be enabled for other serial devices using the ISIG bit
diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index 2679254..ab7d73f 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -1603,13 +1603,13 @@ errout:
 
 int uart_register(FAR const char *path, FAR uart_dev_t *dev)
 {
-#ifdef CONFIG_SERIAL_TERMIOS
-#  if defined(CONFIG_TTY_SIGINT) || defined(CONFIG_TTY_SIGTSTP)
+#if defined(CONFIG_TTY_SIGINT) || defined(CONFIG_TTY_SIGTSTP)
   /* Initialize  of the task that will receive SIGINT signals. */
 
   dev->pid = (pid_t)-1;
-#  endif
+#endif
 
+#ifdef CONFIG_SERIAL_TERMIOS
   /* If this UART is a serial console */
 
   if (dev->isconsole)
diff --git a/include/nuttx/serial/serial.h b/include/nuttx/serial/serial.h
index 5d2435d..6645da5 100644
--- a/include/nuttx/serial/serial.h
+++ b/include/nuttx/serial/serial.h
@@ -280,15 +280,16 @@ struct uart_dev_s
 #endif
   bool                 isconsole;    /* true: This is the serial console */
 
+#if defined(CONFIG_TTY_SIGINT) || defined(CONFIG_TTY_SIGTSTP)
+  pid_t                pid;          /* Thread PID to receive signals (-1 if none) */
+#endif
+
 #ifdef CONFIG_SERIAL_TERMIOS
   /* Terminal control flags */
 
   tcflag_t             tc_iflag;     /* Input modes */
   tcflag_t             tc_oflag;     /* Output modes */
   tcflag_t             tc_lflag;     /* Local modes */
-#if defined(CONFIG_TTY_SIGINT) || defined(CONFIG_TTY_SIGTSTP)
-  pid_t                pid;          /* Thread PID to receive signals (-1 if none) */
-#endif
 #endif
 
   /* Semaphores */

[incubator-nuttx] 04/07: arch/renesas: Undefine macro B0 to avoid the confliction

Posted by gu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gustavonihei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 228442ee239092df667d22f602b7057f9dcc73cb
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sat Dec 18 01:18:34 2021 +0800

    arch/renesas: Undefine macro B0 to avoid the confliction
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/renesas/include/rx65n/iodefine.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/renesas/include/rx65n/iodefine.h b/arch/renesas/include/rx65n/iodefine.h
index e83f906..4777223 100644
--- a/arch/renesas/include/rx65n/iodefine.h
+++ b/arch/renesas/include/rx65n/iodefine.h
@@ -1022,6 +1022,8 @@
 #define FLASHCONST      (*(volatile struct st_flashconst      *)0xfe7f7d90)
 #define TEMPSCONST      (*(volatile struct st_tempsconst      *)0xfe7f7d7c)
 
+#undef B0 /* Avoid the conflicted macro in termios.h */
+
 /****************************************************************************
  * Public Types
  ****************************************************************************/

[incubator-nuttx] 02/07: serial: Move tcdrain implementation from drivers/serial to libc

Posted by gu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gustavonihei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 86684105f9e6a603b5230c6c49f3232cc045c639
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Fri Dec 17 22:02:43 2021 +0800

    serial: Move tcdrain implementation from drivers/serial to libc
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 drivers/serial/Make.defs                           |  6 ----
 drivers/serial/serial.c                            | 30 +++++++++++++++++---
 include/sys/syscall_lookup.h                       |  3 --
 libs/libc/termios/Make.defs                        |  2 +-
 .../tcdrain.c => libs/libc/termios/lib_tcdrain.c   | 33 ++--------------------
 syscall/syscall.csv                                |  1 -
 6 files changed, 29 insertions(+), 46 deletions(-)

diff --git a/drivers/serial/Make.defs b/drivers/serial/Make.defs
index d75e693..1486d58 100644
--- a/drivers/serial/Make.defs
+++ b/drivers/serial/Make.defs
@@ -36,12 +36,6 @@ ifeq ($(CONFIG_RPMSG_UART),y)
   CSRCS += uart_rpmsg.c
 endif
 
-# termios support
-
-ifeq ($(CONFIG_SERIAL_TERMIOS),y)
-  CSRCS += tcdrain.c
-endif
-
 # Pseudo-terminal support
 
 ifeq ($(CONFIG_PSEUDOTERM),y)
diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index ab7d73f..d9e71bb 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -41,6 +41,7 @@
 #include <nuttx/sched.h>
 #include <nuttx/signal.h>
 #include <nuttx/fs/fs.h>
+#include <nuttx/cancelpt.h>
 #include <nuttx/serial/serial.h>
 #include <nuttx/fs/ioctl.h>
 #include <nuttx/power/pm.h>
@@ -87,7 +88,8 @@ static int     uart_putxmitchar(FAR uart_dev_t *dev, int ch,
 static inline ssize_t uart_irqwrite(FAR uart_dev_t *dev,
                                     FAR const char *buffer,
                                     size_t buflen);
-static int     uart_tcdrain(FAR uart_dev_t *dev, clock_t timeout);
+static int     uart_tcdrain(FAR uart_dev_t *dev,
+                            bool cancelable, clock_t timeout);
 
 /* Character driver methods */
 
@@ -397,10 +399,25 @@ static inline ssize_t uart_irqwrite(FAR uart_dev_t *dev,
  *
  ****************************************************************************/
 
-static int uart_tcdrain(FAR uart_dev_t *dev, clock_t timeout)
+static int uart_tcdrain(FAR uart_dev_t *dev,
+                        bool cancelable, clock_t timeout)
 {
   int ret;
 
+  /* tcdrain is a cancellation point */
+
+  if (cancelable && enter_cancellation_point())
+    {
+#ifdef CONFIG_CANCELLATION_POINTS
+      /* If there is a pending cancellation, then do not perform
+       * the wait.  Exit now with ECANCELED.
+       */
+
+      leave_cancellation_point();
+      return -ECANCELED;
+#endif
+    }
+
   /* Get exclusive access to the to dev->tmit.  We cannot permit new data to
    * be written while we are trying to flush the old data.
    *
@@ -503,6 +520,11 @@ static int uart_tcdrain(FAR uart_dev_t *dev, clock_t timeout)
       uart_givesem(&dev->xmit.sem);
     }
 
+  if (cancelable)
+    {
+      leave_cancellation_point();
+    }
+
   return ret;
 }
 
@@ -661,7 +683,7 @@ static int uart_close(FAR struct file *filep)
     {
       /* Now we wait for the transmit buffer(s) to clear */
 
-      uart_tcdrain(dev, 4 * TICK_PER_SEC);
+      uart_tcdrain(dev, false, 4 * TICK_PER_SEC);
     }
 
   /* Free the IRQ and disable the UART */
@@ -1366,7 +1388,7 @@ static int uart_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
 
           case TCDRN:
             {
-              ret = uart_tcdrain(dev, 10 * TICK_PER_SEC);
+              ret = uart_tcdrain(dev, true, 10 * TICK_PER_SEC);
             }
             break;
 #endif
diff --git a/include/sys/syscall_lookup.h b/include/sys/syscall_lookup.h
index 47310c2..8b677fa 100644
--- a/include/sys/syscall_lookup.h
+++ b/include/sys/syscall_lookup.h
@@ -223,9 +223,6 @@ SYSCALL_LOOKUP(pwrite,                     4)
   SYSCALL_LOOKUP(timerfd_settime,          4)
   SYSCALL_LOOKUP(timerfd_gettime,          2)
 #endif
-#ifdef CONFIG_SERIAL_TERMIOS
-  SYSCALL_LOOKUP(tcdrain,                  1)
-#endif
 
 /* Board support */
 
diff --git a/libs/libc/termios/Make.defs b/libs/libc/termios/Make.defs
index 2846758..974bc06 100644
--- a/libs/libc/termios/Make.defs
+++ b/libs/libc/termios/Make.defs
@@ -26,7 +26,7 @@ ifeq ($(CONFIG_SERIAL_TERMIOS),y)
 # Add the termios C files to the build
 
 CSRCS += lib_cfspeed.c lib_cfmakeraw.c lib_isatty.c lib_tcflush.c
-CSRCS += lib_tcflow.c lib_tcgetattr.c lib_tcsetattr.c
+CSRCS += lib_tcdrain.c lib_tcflow.c lib_tcgetattr.c lib_tcsetattr.c
 CSRCS += lib_ttyname.c lib_ttynamer.c
 
 # Add the termios directory to the build
diff --git a/drivers/serial/tcdrain.c b/libs/libc/termios/lib_tcdrain.c
similarity index 72%
rename from drivers/serial/tcdrain.c
rename to libs/libc/termios/lib_tcdrain.c
index fc896f9..c0e242a 100644
--- a/drivers/serial/tcdrain.c
+++ b/libs/libc/termios/lib_tcdrain.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * drivers/serial/tcdrain.c
+ * libs/libc/termios/lib_tcdrain.c
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -29,7 +29,6 @@
 #include <termios.h>
 #include <errno.h>
 
-#include <nuttx/cancelpt.h>
 #include <nuttx/serial/tioctl.h>
 
 /****************************************************************************
@@ -54,33 +53,5 @@
 
 int tcdrain(int fd)
 {
-  int ret;
-
-  /* tcdrain is a cancellation point */
-
-  if (enter_cancellation_point())
-    {
-#ifdef CONFIG_CANCELLATION_POINTS
-      /* If there is a pending cancellation, then do not perform
-       * the wait.  Exit now with ECANCELED.
-       */
-
-      set_errno(ECANCELED);
-      leave_cancellation_point();
-      return ERROR;
-#endif
-    }
-
-  /* Perform the TCDRM IOCTL command.  It is safe to use the file descriptor
-   * in this context because we are executing on the calling application's
-   * thread.
-   *
-   * NOTE: ioctl() will set the errno variable and return ERROR if any error
-   * occurs.
-   */
-
-  ret = ioctl(fd, TCDRN, (unsigned long)0);
-
-  leave_cancellation_point();
-  return ret;
+  return ioctl(fd, TCDRN, (unsigned long)0);
 }
diff --git a/syscall/syscall.csv b/syscall/syscall.csv
index 21445cf..2a6ae80 100644
--- a/syscall/syscall.csv
+++ b/syscall/syscall.csv
@@ -177,7 +177,6 @@
 "task_setcanceltype","sched.h","defined(CONFIG_CANCELLATION_POINTS)","int","int","FAR int *"
 "task_spawn","nuttx/spawn.h","!defined(CONFIG_BUILD_KERNEL)","int","FAR const char *","main_t","FAR const posix_spawn_file_actions_t *","FAR const posix_spawnattr_t *","FAR char * const []|FAR char * const *","FAR char * const []|FAR char * const *"
 "task_testcancel","pthread.h","defined(CONFIG_CANCELLATION_POINTS)","void"
-"tcdrain","termios.h","defined(CONFIG_SERIAL_TERMIOS)","int","int"
 "telldir","dirent.h","","off_t","FAR DIR *"
 "timer_create","time.h","!defined(CONFIG_DISABLE_POSIX_TIMERS)","int","clockid_t","FAR struct sigevent *","FAR timer_t *"
 "timer_delete","time.h","!defined(CONFIG_DISABLE_POSIX_TIMERS)","int","timer_t"

[incubator-nuttx] 06/07: sched: Remove the condition guard from getppid prototype

Posted by gu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gustavonihei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 965f7641fd2c3911f64619c34e0705684e0b5fa6
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Fri Dec 17 02:57:31 2021 +0800

    sched: Remove the condition guard from getppid prototype
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 include/unistd.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/unistd.h b/include/unistd.h
index d6092e1..02e62d2 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -302,9 +302,7 @@ extern "C"
 pid_t   vfork(void);
 pid_t   getpid(void);
 pid_t   gettid(void);
-#ifdef CONFIG_SCHED_HAVE_PARENT
 pid_t   getppid(void);
-#endif
 void    _exit(int status) noreturn_function;
 unsigned int sleep(unsigned int seconds);
 int     usleep(useconds_t usec);