Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming.threads > #1114
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail |
|---|---|
| NNTP-Posting-Date | Fri, 28 Sep 2012 14:15:02 -0500 |
| Message-ID | <069hj9-3um.ln1@wilbur.25thandClement.com> (permalink) |
| From | William Ahern <william@wilbur.25thandClement.com> |
| Subject | Re: Trivial C11 threads.h wrapper (public domain) |
| Newsgroups | comp.lang.c, comp.programming.threads |
| References | <slrnk67ihu.3ts.nuclear@goat.mutantstargoat.com> <ln3924runh.fsf@nuthaus.mib.org> <slrnk67knj.3ts.nuclear@goat.mutantstargoat.com> <50646436$0$13270$4fafbaef@reader2.news.tin.it> <slrnk68tso.9lj.nuclear@goat.mutantstargoat.com> |
| User-Agent | tin/2.0.0-20110823 ("Ardenistiel") (UNIX) (OpenBSD/5.1 (amd64)) |
| Date | Fri, 28 Sep 2012 12:08:16 -0700 |
| Lines | 32 |
| X-Usenet-Provider | http://www.giganews.com |
| X-Trace | sv3-z5wUQSvMU1WbQbF4hJMvI4LP3DbClkA6ZwRBiiqBSvmSgbWbO7xEcEayFFlxIsXvqAXsXlQj+y86lv7!1U49icYwDphfV6fhWr28dIoWX0yFxjJZxzpXa03FIX+zdyxi/6Rw96q5OZx/yxDCnw== |
| X-Complaints-To | abuse@giganews.com |
| X-DMCA-Notifications | http://www.giganews.com/info/dmca.html |
| X-Abuse-and-DMCA-Info | Please be sure to forward a copy of ALL headers |
| X-Abuse-and-DMCA-Info | Otherwise we will be unable to process your complaint properly |
| X-Postfilter | 1.3.40 |
| X-Original-Bytes | 2526 |
| Xref | csiph.com comp.lang.c:26776 comp.programming.threads:1114 |
Cross-posted to 2 groups.
Show key headers only | View raw
John Tsiombikas <nuclear@member.fsf.org> wrote:
> On 2012-09-27, Lorenzo Beretta <lory.fulgi@infinito.it> wrote:
> > I haven't read it carefully enough to count as proofreading... most of
> > it seem to make sense, except for a couple of things:
> > 1. pthread_create can return EAGAIN, isn't it almost the same as thrd_nomem?
> I though about that for a bit while writting it, but after reading the
> pthreads manpage and the C standard a couple of times, I decided it's
> probably not the same error, and I thought it would be best to just
> leave thrd_nomem out. Might be wrong, I'll go through them again.
> > 2. pthread_mutex_timedlock sucks badly -- even microsoft got it right!
> > Try the following program and try not to scream when you realize
> > *why* it's not doing what you'd expect :)
> >
> > ...
> > const int s = 5;
> > ...
> > t.tv_nsec = 0;
> > t.tv_sec = s;
> > /* puke! */
> > printf("timed_lock(%d) = %d\n", s, pthread_mutex_timedlock(&m, &t));
> *gasp* ... it's absolute time ?! I must admit I never used
> timedlocks...
> I suppose that makes it easier to ask it to try locking the mutex
> until next friday at 3 o'clock or something :)
I believe some implementations support the option to base it on
CLOCK_MONOTONIC.
Back to comp.programming.threads | Previous | Next — Previous in thread | Next in thread | Find similar
Trivial C11 threads.h wrapper (public domain) John Tsiombikas <nuclear@member.fsf.org> - 2012-09-27 03:38 +0000
Re: Trivial C11 threads.h wrapper (public domain) Keith Thompson <kst-u@mib.org> - 2012-09-26 20:50 -0700
Re: Trivial C11 threads.h wrapper (public domain) John Tsiombikas <nuclear@member.fsf.org> - 2012-09-27 04:15 +0000
Re: Trivial C11 threads.h wrapper (public domain) Lorenzo Beretta <lory.fulgi@infinito.it> - 2012-09-27 16:35 +0200
Re: Trivial C11 threads.h wrapper (public domain) John Tsiombikas <nuclear@member.fsf.org> - 2012-09-27 15:58 +0000
Re: Trivial C11 threads.h wrapper (public domain) Lorenzo Beretta <lory.fulgi@infinito.it> - 2012-09-27 18:27 +0200
Re: Trivial C11 threads.h wrapper (public domain) William Ahern <william@wilbur.25thandClement.com> - 2012-09-28 12:08 -0700
Re: Trivial C11 threads.h wrapper (public domain) Kaz Kylheku <kaz@kylheku.com> - 2012-09-28 19:38 +0000
Re: Trivial C11 threads.h wrapper (public domain) Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-09-28 15:50 -0400
Re: Trivial C11 threads.h wrapper (public domain) Lorenzo Beretta <lory.fulgi@infinito.it> - 2012-09-29 18:41 +0200
Re: Trivial C11 threads.h wrapper (public domain) Markus Elfring <Markus.Elfring@web.de> - 2012-09-27 13:45 +0200
Re: Trivial C11 threads.h wrapper (public domain) John Tsiombikas <nuclear@member.fsf.org> - 2012-09-27 16:14 +0000
Re: Trivial C11 threads.h wrapper (public domain) Markus Elfring <Markus.Elfring@web.de> - 2012-09-28 12:05 +0200
Re: Trivial C11 threads.h wrapper (public domain) Keith Thompson <kst-u@mib.org> - 2012-09-28 03:39 -0700
Re: Trivial C11 threads.h wrapper (public domain) James Kuyper <jameskuyper@verizon.net> - 2012-09-28 08:23 -0400
Re: Trivial C11 threads.h wrapper (public domain) John Tsiombikas <nuclear@member.fsf.org> - 2012-09-28 19:48 +0000
Re: Trivial C11 threads.h wrapper (public domain) Toby Douglass <a@b.com> - 2012-10-01 20:19 +0200
Re: Trivial C11 threads.h wrapper (public domain) James Kuyper <jameskuyper@verizon.net> - 2012-10-01 14:37 -0400
Re: Trivial C11 threads.h wrapper (public domain) Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-10-01 14:38 -0400
Re: Trivial C11 threads.h wrapper (public domain) Keith Thompson <kst-u@mib.org> - 2012-10-01 14:58 -0700
Re: Trivial C11 threads.h wrapper (public domain) Jens Gustedt <jens.gustedt@loria.fr> - 2012-09-28 20:22 +0200
Re: Trivial C11 threads.h wrapper (public domain) Markus Elfring <Markus.Elfring@web.de> - 2012-09-30 23:13 +0200
Re: Trivial C11 threads.h wrapper (public domain) Keith Thompson <kst-u@mib.org> - 2012-09-30 14:28 -0700
Re: Trivial C11 threads.h wrapper (public domain) Jens Gustedt <jens.gustedt@loria.fr> - 2012-10-01 00:37 +0200
Re: Trivial C11 threads.h wrapper (public domain) Jens Gustedt <jens.gustedt@loria.fr> - 2012-10-01 00:44 +0200
Re: Trivial C11 threads.h wrapper (public domain) Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-09-30 19:48 -0400
Re: Trivial C11 threads.h wrapper (public domain) Jens Gustedt <jens.gustedt@loria.fr> - 2012-10-01 08:26 +0200
Re: Trivial C11 threads.h wrapper (public domain) Markus Elfring <Markus.Elfring@web.de> - 2012-10-01 11:25 +0200
Re: Trivial C11 threads.h wrapper (public domain) Jens Gustedt <jens.gustedt@loria.fr> - 2012-10-01 11:47 +0200
Re: Trivial C11 threads.h wrapper (public domain) Markus Elfring <Markus.Elfring@web.de> - 2012-10-01 12:05 +0200
Re: Trivial C11 threads.h wrapper (public domain) Jens Gustedt <jens.gustedt@loria.fr> - 2012-10-01 13:15 +0200
Clarification for interface specification "C11 threads.h" Markus Elfring <Markus.Elfring@web.de> - 2012-10-03 11:02 +0200
Re: Clarification for interface specification "C11 threads.h" Keith Thompson <kst-u@mib.org> - 2012-10-03 13:29 -0700
Re: Clarification for interface specification "C11 threads.h" Jens Gustedt <jens.gustedt@loria.fr> - 2012-10-04 13:35 +0200
Re: Clarification for interface specification "C11 threads.h" Markus Elfring <Markus.Elfring@web.de> - 2012-10-12 17:45 +0200
Re: Trivial C11 threads.h wrapper (public domain) Noob <root@127.0.0.1> - 2012-10-01 18:10 +0200
Re: Trivial C11 threads.h wrapper (public domain) Nick Bowler <nbowler@draconx.ca> - 2012-10-01 19:28 +0000
Re: Trivial C11 threads.h wrapper (public domain) Keith Thompson <kst-u@mib.org> - 2012-10-01 15:19 -0700
Re: Trivial C11 threads.h wrapper (public domain) Kaz Kylheku <kaz@kylheku.com> - 2012-10-01 23:57 +0000
Re: Trivial C11 threads.h wrapper (public domain) Jens Gustedt <jens.gustedt@loria.fr> - 2012-10-02 14:48 +0200
csiph-web