about summary refs log tree commit diff
path: root/posix
diff options
context:
space:
mode:
Diffstat (limited to 'posix')
-rw-r--r--posix/glob.h23
-rw-r--r--posix/regex.h10
-rw-r--r--posix/spawn.h64
-rw-r--r--posix/unistd.h6
4 files changed, 67 insertions, 36 deletions
diff --git a/posix/glob.h b/posix/glob.h
index 7d93b98320..5ce4c9aa92 100644
--- a/posix/glob.h
+++ b/posix/glob.h
@@ -120,8 +120,9 @@ typedef struct
     void (*gl_closedir) __PMT ((void *));
     struct dirent *(*gl_readdir) __PMT ((void *));
     __ptr_t (*gl_opendir) __PMT ((__const char *));
-    int (*gl_lstat) __PMT ((__const char *, struct stat *));
-    int (*gl_stat) __PMT ((__const char *, struct stat *));
+    int (*gl_lstat) __PMT ((__const char *__restrict,
+			    struct stat *__restrict));
+    int (*gl_stat) __PMT ((__const char *__restrict, struct stat *__restrict));
   } glob_t;
 
 #ifdef _LARGEFILE64_SOURCE
@@ -138,8 +139,10 @@ typedef struct
     void (*gl_closedir) __PMT ((void *));
     struct dirent64 *(*gl_readdir) __PMT ((void *));
     __ptr_t (*gl_opendir) __PMT ((__const char *));
-    int (*gl_lstat) __PMT ((__const char *, struct stat64 *));
-    int (*gl_stat) __PMT ((__const char *, struct stat64 *));
+    int (*gl_lstat) __PMT ((__const char *__restrict,
+			    struct stat64 *__restrict));
+    int (*gl_stat) __PMT ((__const char *__restrict,
+			   struct stat64 *__restrict));
   } glob64_t;
 #endif
 
@@ -157,24 +160,24 @@ typedef struct
    If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned.
    Otherwise, `glob' returns zero.  */
 #if _FILE_OFFSET_BITS != 64 || __GNUC__ < 2
-extern int glob __P ((__const char *__pattern, int __flags,
+extern int glob __P ((__const char *__restrict __pattern, int __flags,
 		      int (*__errfunc) (__const char *, int),
-		      glob_t *__pglob));
+		      glob_t *__restrict __pglob));
 
 /* Free storage allocated in PGLOB by a previous `glob' call.  */
 extern void globfree __P ((glob_t *__pglob));
 #else
-extern int glob __P ((__const char *__pattern, int __flags,
+extern int glob __P ((__const char *__restrict __pattern, int __flags,
 		      int (*__errfunc) (__const char *, int),
-		      glob_t *__pglob)) __asm__ ("glob64");
+		      glob_t *__restrict __pglob)) __asm__ ("glob64");
 
 extern void globfree __P ((glob_t *__pglob)) __asm__ ("globfree64");
 #endif
 
 #ifdef _LARGEFILE64_SOURCE
-extern int glob64 __P ((__const char *__pattern, int __flags,
+extern int glob64 __P ((__const char *__restrict __pattern, int __flags,
 			int (*__errfunc) (__const char *, int),
-			glob64_t *__pglob));
+			glob64_t *__restrict __pglob));
 
 extern void globfree64 __P ((glob64_t *__pglob));
 #endif
diff --git a/posix/regex.h b/posix/regex.h
index 5edeff3551..8576fe68fa 100644
--- a/posix/regex.h
+++ b/posix/regex.h
@@ -514,12 +514,14 @@ extern int re_exec _RE_ARGS ((const char *));
 #endif
 
 /* POSIX compatibility.  */
-extern int regcomp _RE_ARGS ((regex_t *__preg, const char *__pattern,
+extern int regcomp _RE_ARGS ((regex_t *__restrict __preg,
+			      const char *__restrict __pattern,
 			      int __cflags));
 
-extern int regexec _RE_ARGS ((const regex_t *__preg,
-			      const char *__string, size_t __nmatch,
-			      regmatch_t __pmatch[], int __eflags));
+extern int regexec _RE_ARGS ((const regex_t *__restrict __preg,
+			      const char *__restrict __string, size_t __nmatch,
+			      regmatch_t __pmatch[__restrict_arr],
+			      int __eflags));
 
 extern size_t regerror _RE_ARGS ((int __errcode, const regex_t *__preg,
 				  char *__errbuf, size_t __errbuf_size));
diff --git a/posix/spawn.h b/posix/spawn.h
index 9487cbd179..38bdbd37b5 100644
--- a/posix/spawn.h
+++ b/posix/spawn.h
@@ -63,10 +63,13 @@ __BEGIN_DECLS
 
 /* Spawn a new process executing PATH with the attributes describes in *ATTRP.
    Before running the process perform the actions described in FILE-ACTIONS. */
-extern int posix_spawn (pid_t *__pid, __const char *__path,
-			__const posix_spawn_file_actions_t *__file_actions,
-			__const posix_spawnattr_t *__attrp,
-			char *__const argv[], char *__const envp[]) __THROW;
+extern int posix_spawn (pid_t *__restrict __pid,
+			__const char *__restrict __path,
+			__const posix_spawn_file_actions_t *__restrict
+			__file_actions,
+			__const posix_spawnattr_t *__restrict __attrp,
+			char *__const argv[__restrict_arr],
+			char *__const envp[__restrict_arr]) __THROW;
 
 /* Similar to `posix_spawn' but search for FILE in the PATH.  */
 extern int posix_spawnp (pid_t *__pid, __const char *__file,
@@ -83,46 +86,66 @@ extern int posix_spawnattr_destroy (posix_spawnattr_t *__attr) __THROW;
 
 /* Store signal mask for signals with default handling from ATTR in
    SIGDEFAULT.  */
-extern int posix_spawnattr_getsigdefault (__const posix_spawnattr_t *__attr,
-					  sigset_t *__sigdefault) __THROW;
+extern int posix_spawnattr_getsigdefault (__const posix_spawnattr_t *
+					  __restrict __attr,
+					  sigset_t *__restrict __sigdefault)
+     __THROW;
 
 /* Set signal mask for signals with default handling in ATTR to SIGDEFAULT.  */
-extern int posix_spawnattr_setsigdefault (posix_spawnattr_t *__attr,
-					  __const sigset_t *__sigdefault)
+extern int posix_spawnattr_setsigdefault (posix_spawnattr_t *__restrict __attr,
+					  __const sigset_t *__restrict
+					  __sigdefault)
      __THROW;
 
 /* Store signal mask for the new process from ATTR in SIGMASK.  */
-extern int posix_spawnattr_getsigmask (__const posix_spawnattr_t *__attr,
-				       sigset_t *__sigmask) __THROW;
+extern int posix_spawnattr_getsigmask (__const posix_spawnattr_t *__restrict
+				       __attr,
+				       sigset_t *__restrict __sigmask) __THROW;
 
 /* Set signal mask for the new process in ATTR to SIGMASK.  */
-extern int posix_spawnattr_setsigmask (posix_spawnattr_t *__attr,
-				       __const sigset_t *__sigmask) __THROW;
+extern int posix_spawnattr_setsigmask (posix_spawnattr_t *__restrict __attr,
+				       __const sigset_t *__restrict __sigmask)
+     __THROW;
 
 /* Get flag word from the attribute structure.  */
-extern int posix_spawnattr_getflags (__const posix_spawnattr_t *__attr,
-				     short int *__flags) __THROW;
+extern int posix_spawnattr_getflags (__const posix_spawnattr_t *__restrict
+				     __attr,
+				     short int *__restrict __flags) __THROW;
 
 /* Store flags in the attribute structure.  */
 extern int posix_spawnattr_setflags (posix_spawnattr_t *_attr,
 				     short int __flags) __THROW;
 
 /* Get process group ID from the attribute structure.  */
-extern int posix_spawnattr_getpgroup (__const posix_spawnattr_t *__attr,
-				      pid_t *__pgroup) __THROW;
+extern int posix_spawnattr_getpgroup (__const posix_spawnattr_t *__restrict
+				      __attr, pid_t *__restrict __pgroup)
+     __THROW;
 
 /* Store process group ID in the attribute structure.  */
 extern int posix_spawnattr_setpgroup (posix_spawnattr_t *__attr,
 				      pid_t __pgroup) __THROW;
 
 /* Get scheduling policy from the attribute structure.  */
-extern int posix_spawnattr_getschedpolicy (__const posix_spawnattr_t *__attr,
-					   int *__schedpolicy) __THROW;
+extern int posix_spawnattr_getschedpolicy (__const posix_spawnattr_t *
+					   __restrict __attr,
+					   int *__restrict __schedpolicy)
+     __THROW;
 
 /* Store scheduling policy in the attribute structure.  */
 extern int posix_spawnattr_setschedpolicy (posix_spawnattr_t *__attr,
 					   int __schedpolicy) __THROW;
 
+/* Get scheduling parameters from the attribute structure.  */
+extern int posix_spawnattr_getschedparam (__const posix_spawnattr_t *
+					  __restrict __attr,
+					  struct sched_param *__restrict
+					  __schedparam) __THROW;
+
+/* Store scheduling parameters in the attribute structure.  */
+extern int posix_spawnattr_setschedparam (posix_spawnattr_t *__restrict __attr,
+					  const struct sched_param *
+					  __restrict __schedparam) __THROW;
+
 
 /* Initialize data structure for file attribute for `spawn' call.  */
 extern int posix_spawn_file_actions_init (posix_spawn_file_actions_t *
@@ -135,8 +158,9 @@ extern int posix_spawn_file_actions_destroy (posix_spawn_file_actions_t *
 /* Add an action to FILE-ACTIONS which tells the implementation to call
    `open' for the given file during the `spawn' call.  */
 extern int posix_spawn_file_actions_addopen (posix_spawn_file_actions_t *
-					     __file_actions,
-					     int __fd, __const char *__path,
+					     __restrict __file_actions,
+					     int __fd,
+					     __const char *__restrict __path,
 					     int __oflag, mode_t __mode)
      __THROW;
 
diff --git a/posix/unistd.h b/posix/unistd.h
index 0df0e93e08..eebfe88f85 100644
--- a/posix/unistd.h
+++ b/posix/unistd.h
@@ -696,7 +696,8 @@ extern int symlink (__const char *__from, __const char *__to) __THROW;
 /* Read the contents of the symbolic link PATH into no more than
    LEN bytes of BUF.  The contents are not null-terminated.
    Returns the number of characters read, or -1 for errors.  */
-extern int readlink (__const char *__path, char *__buf, size_t __len) __THROW;
+extern int readlink (__const char *__restrict __path, char *__restrict __buf,
+		     size_t __len) __THROW;
 #endif /* Use BSD.  */
 
 /* Remove the link NAME.  */
@@ -961,7 +962,8 @@ extern void encrypt (char *__block, int __edflag) __THROW;
    FROM and copy the result to TO.  The value of TO must not be in the
    range [FROM - N + 1, FROM - 1].  If N is odd the first byte in FROM
    is without partner.  */
-extern void swab (__const void *__from, void *__to, ssize_t __n) __THROW;
+extern void swab (__const void *__restrict __from, void *__restrict __to,
+		  ssize_t __n) __THROW;
 #endif