[PATCH:xset 3/3] Remove direct call to Solaris nanosleep system call

Mark Kettenis mark.kettenis at xs4all.nl
Sat Jul 23 11:49:17 PDT 2011


> X-Original-To: xorg-devel at lists.x.org
> From: Alan Coopersmith <alan.coopersmith at oracle.com>
> Date: Fri, 15 Jul 2011 18:34:21 -0700
> X-Source-IP: acsinet21.oracle.com [141.146.126.237]
> X-Auth-Type: Internal IP
> X-CT-RefId: str=0001.0A090208.4E20EAAA.000E:SCFMA922111,ss=1,re=-4.000,fgs=0
> Sender: xorg-devel-bounces+mark.kettenis=xs4all.nl at lists.x.org
> X-XS4ALL-DNSBL-Checked: mxdrop130.xs4all.nl checked 131.252.210.177 against DNS blacklists
> X-CNFS-Analysis: v=1.1 cv=xL5jk9sXKm39SpsYdNcr82C1o66kMlwr2Nm7bZal+6w= c=1
> 	sm=0 a=8aGmpRoC0K8A:10 a=dPGociXpb70A:10 a=kj9zAlcOel0A:10
> 	a=NZLgQZmgF9XIoAvTQ72Ilw==:17 a=yPCof4ZbAAAA:8 a=aR16PxjQAAAA:8
> 	a=b231yyprlERVTGrP0EAA:9 a=CjuIK1q_8ugA:10 a=CiSHi91Bn78A:10
> 	a=7DSvI1NPTFQA:10 a=NZLgQZmgF9XIoAvTQ72Ilw==:117
> X-Virus-Scanned: by XS4ALL Virus Scanner
> X-XS4ALL-Spam-Score: 0.0 () none
> X-XS4ALL-Spam: NO
> Envelope-To: mark.kettenis at xs4all.nl
> 
> Attempted to workaround nanosleep() being only in POSIX realtime
> extensions library, but both usleep() & nanosleep() are in libc now,
> so not useful anymore, nor was it ever officially supported.
> 
> Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>

Reviewed-by: Mark Kettenis <kettenis at openbsd.org>

> ---
>  xset.c |   17 -----------------
>  1 files changed, 0 insertions(+), 17 deletions(-)
> 
> diff --git a/xset.c b/xset.c
> index cca592d..40fc7e1 100644
> --- a/xset.c
> +++ b/xset.c
> @@ -78,11 +78,6 @@ in this Software without prior written authorization from The Open Group.
>  #  endif
>  #  undef BOOL
>  # endif
> -# ifndef HAVE_USLEEP
> -#  if defined(SVR4) && defined(sun)
> -#   include <sys/syscall.h>
> -#  endif
> -# endif
>  #endif /* DPMSExtension */
>  
>  #ifdef XF86MISC
> @@ -574,18 +569,6 @@ main(int argc, char *argv[])
>  # define Usleep(us) usleep((us))
>  #else
>  #ifdef SVR4
> -# ifdef sun
> -/* Anything to avoid linking with -lposix4 */
> -#  define Usleep(us) { \
> -		struct ts { \
> -			long	tv_sec; \
> -			long	tv_nsec; \
> -		} req; \
> -		req.tv_sec = 0; \
> -		req.tv_nsec = (us) * 1000;\
> -		syscall(SYS_nanosleep, &req, NULL); \
> -	}
> -# endif
>  # ifdef sgi
>  #  define Usleep(us) sginap((us) / 1000)
>  # endif
> -- 
> 1.7.3.2
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
> 


More information about the xorg-devel mailing list