Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Oct 2001 00:00:21 -0700 (PDT)
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: i386/31504: nanosleep() strange behavior 
Message-ID:  <200110260700.f9Q70LS00522@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR i386/31504; it has been noted by GNATS.

From: Poul-Henning Kamp <phk@critter.freebsd.dk>
To: Vladimir Birjukov <prg51@morics.riga.post.lv>
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: i386/31504: nanosleep() strange behavior 
Date: Fri, 26 Oct 2001 08:55:51 +0200

 In message <200110260649.f9Q6ntN98813@freefall.freebsd.org>, Vladimir Birjukov 
 writes:
 
 >In picprog program (ports/devel/picprog), which work nice in FreeBSD 4.3-RELEASE
 >after become STABLE lost functioning. Because such fragment
 >  ioctl (fd, TIOCMBIS, &picport::rts_bit); // clock up
 >  delay_100 ();
 >  ioctl (fd, TIOCMBIC, &picport::rts_bit); // clock down
 >where delay_100 is:
 >  static const struct timespec ns100 = { 0, 100 };                              
 >  nanosleep (&ns100, 0);                                                        
 >Makes 10 milliseconds pulse instead 0.1 mikrosecond
 
 nanosleep() has a resolution if 1/hz.
 
 By default your hz is 100 which is where your 10 msec comes from.
 
 You can increas hz to 1000 with no problems, 10000 works
 as well on some hardware, but there is a bug in the tty c_cc[VTIME]
 handling which gets increasingly bothersome for increasing hz
 
 -- 
 Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
 phk@FreeBSD.ORG         | TCP/IP since RFC 956
 FreeBSD committer       | BSD since 4.3-tahoe    
 Never attribute to malice what can adequately be explained by incompetence.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200110260700.f9Q70LS00522>