diff options
Diffstat (limited to 'libc/sysdeps/linux/sparc64')
| -rw-r--r-- | libc/sysdeps/linux/sparc64/Makefile.arch | 2 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sparc64/bits/fcntl.h | 2 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sparc64/bits/resource.h | 21 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sparc64/bits/stat.h | 4 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sparc64/sigaction.c | 10 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sparc64/sigreturn_stub.S | 10 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sparc64/sysdep.h | 9 | 
7 files changed, 43 insertions, 15 deletions
| diff --git a/libc/sysdeps/linux/sparc64/Makefile.arch b/libc/sysdeps/linux/sparc64/Makefile.arch index 37b539b3b..cc4000b78 100644 --- a/libc/sysdeps/linux/sparc64/Makefile.arch +++ b/libc/sysdeps/linux/sparc64/Makefile.arch @@ -5,7 +5,7 @@  CSRC-y := __syscall_error.c sigaction.c  SSRC-y := __longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S brk.S fork.S \ -	syscall.S pipe.S vfork.S clone.S +	syscall.S pipe.S vfork.S clone.S sigreturn_stub.S  CSRC-y += $(addprefix soft-fp/, \  	qp_add.c qp_cmp.c qp_cmpe.c qp_div.c qp_dtoq.c qp_feq.c qp_fge.c \ diff --git a/libc/sysdeps/linux/sparc64/bits/fcntl.h b/libc/sysdeps/linux/sparc64/bits/fcntl.h index 395c95baf..00e91a671 100644 --- a/libc/sysdeps/linux/sparc64/bits/fcntl.h +++ b/libc/sysdeps/linux/sparc64/bits/fcntl.h @@ -248,3 +248,5 @@ extern ssize_t tee (int __fdin, int __fdout, size_t __len,  #endif  __END_DECLS +/* Include generic Linux declarations.  */ +#include <bits/fcntl-linux.h> diff --git a/libc/sysdeps/linux/sparc64/bits/resource.h b/libc/sysdeps/linux/sparc64/bits/resource.h index 366e5c2d9..84c768785 100644 --- a/libc/sysdeps/linux/sparc64/bits/resource.h +++ b/libc/sysdeps/linux/sparc64/bits/resource.h @@ -98,7 +98,13 @@ enum __rlimit_resource    __RLIMIT_RTPRIO = 14,  #define RLIMIT_RTPRIO __RLIMIT_RTPRIO -  __RLIMIT_NLIMITS = 15, +  /* Maximum CPU time in µs that a process scheduled under a real-time +     scheduling policy may consume without making a blocking system +     call before being forcibly descheduled.  */ +  __RLIMIT_RTTIME = 15, +#define RLIMIT_RTTIME __RLIMIT_RTTIME + +  __RLIMIT_NLIMITS = 16,    __RLIM_NLIMITS = __RLIMIT_NLIMITS  #define RLIMIT_NLIMITS __RLIMIT_NLIMITS  #define RLIM_NLIMITS __RLIM_NLIMITS @@ -122,11 +128,11 @@ enum __rlimit_resource  #ifndef __USE_FILE_OFFSET64  # define RLIM_INFINITY ((long int)(~0UL >> 1))  #else -# define RLIM_INFINITY 0x7fffffffffffffffLL +# define RLIM_INFINITY 0xffffffffffffffffULL  #endif  #ifdef __USE_LARGEFILE64 -# define RLIM64_INFINITY 0x7fffffffffffffffLL +# define RLIM64_INFINITY 0xffffffffffffffffULL  #endif  #endif @@ -174,6 +180,15 @@ enum __rusage_who    /* All of its terminated child processes.  */    RUSAGE_CHILDREN = -1  #define RUSAGE_CHILDREN RUSAGE_CHILDREN + +#ifdef __USE_GNU +  , +  /* The calling thread.  */ +  RUSAGE_THREAD = 1 +# define RUSAGE_THREAD RUSAGE_THREAD +  /* Name for the same functionality on Solaris.  */ +# define RUSAGE_LWP RUSAGE_THREAD +#endif  };  #define __need_timeval diff --git a/libc/sysdeps/linux/sparc64/bits/stat.h b/libc/sysdeps/linux/sparc64/bits/stat.h index 8516b159c..62b48b745 100644 --- a/libc/sysdeps/linux/sparc64/bits/stat.h +++ b/libc/sysdeps/linux/sparc64/bits/stat.h @@ -58,7 +58,7 @@ struct stat  #else      __blkcnt64_t st_blocks;		/* Number 512-byte blocks allocated. */  #endif -#ifdef __USE_MISC +#if defined(__USE_MISC) || defined(__USE_XOPEN2K8)      /* Nanosecond resolution timestamps are stored in a format         equivalent to 'struct timespec'.  This is the type used         whenever possible but the Unix namespace rules do not allow the @@ -101,7 +101,7 @@ struct stat64      __blksize_t st_blksize;		/* Optimal block size for I/O.  */      __blkcnt64_t st_blocks;		/* Number 512-byte blocks allocated. */ -#ifdef __USE_MISC +#if defined(__USE_MISC) || defined(__USE_XOPEN2K8)      /* Nanosecond resolution timestamps are stored in a format         equivalent to 'struct timespec'.  This is the type used         whenever possible but the Unix namespace rules do not allow the diff --git a/libc/sysdeps/linux/sparc64/sigaction.c b/libc/sysdeps/linux/sparc64/sigaction.c index d8aaad0fb..b28fa659a 100644 --- a/libc/sysdeps/linux/sparc64/sigaction.c +++ b/libc/sysdeps/linux/sparc64/sigaction.c @@ -26,7 +26,7 @@  /* SPARC 64bit userland requires a kernel that has rt signals anyway. */ -static void __rt_sigreturn_stub (void); +void __rt_sigreturn_stub (void);  int __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)  { @@ -67,11 +67,3 @@ libc_hidden_weak(sigaction)  # endif  #endif -static void -__rt_sigreturn_stub (void) -{ -  __asm__ ("mov %0, %%g1\n\t" -	   "ta	0x6d\n\t" -	   : /* no outputs */ -	   : "i" (__NR_rt_sigreturn)); -} diff --git a/libc/sysdeps/linux/sparc64/sigreturn_stub.S b/libc/sysdeps/linux/sparc64/sigreturn_stub.S new file mode 100644 index 000000000..a5c9bb47f --- /dev/null +++ b/libc/sysdeps/linux/sparc64/sigreturn_stub.S @@ -0,0 +1,10 @@ +#include <sysdep.h> + +        nop +        nop + +ENTRY_NOCFI (__rt_sigreturn_stub) +        mov     __NR_rt_sigreturn, %g1 +        ta      0x6d +END_NOCFI (__rt_sigreturn_stub) + diff --git a/libc/sysdeps/linux/sparc64/sysdep.h b/libc/sysdeps/linux/sparc64/sysdep.h index 31008c34b..5a4c36348 100644 --- a/libc/sysdeps/linux/sparc64/sysdep.h +++ b/libc/sysdeps/linux/sparc64/sysdep.h @@ -83,6 +83,15 @@ C_LABEL(name)                       \      cfi_endproc;                    \      .size name, . - name +#define ENTRY_NOCFI(name)			\ +	.align	4;			\ +	.global	C_SYMBOL_NAME(name);	\ +	.type	name, @function;	    \ +C_LABEL(name) + +#define END_NOCFI(name)			    \ +	.size name, . - name +  #define LOC(name) .L##name  #undef PSEUDO | 
