public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Jiri Jaburek <jjaburek@redhat.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] prototyping new library synchronization
Date: Fri, 13 Feb 2015 17:29:15 +0100	[thread overview]
Message-ID: <20150213162915.GA8996@rei.suse.de> (raw)
In-Reply-To: <54DDD96D.3020304@redhat.com>

Hi!
> Some notes;
> 
> I assume you used syscall(SYS_futex, ..) instead of pthread_mutex (which
> uses it internally) because of the linking simplicity, right?
> Fair tradeoff.

Not only. As far as I know pthread_mutexes use private futexes and as
far as I understand these these will not work with forked processes. Or
at least are not expected to be used that way I haven't actually tried
it.

> No idea what you're going to use for the final code, but I'd default to
> 
>   perror("open()");
> 
> instead of
> 
>   fprintf(stderr, "open(): %s\n", strerror(errno));
> 
> (you also don't need errno.h for the former one).

The code is just quick test. I will desing proper library functions
later.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  parent reply	other threads:[~2015-02-13 16:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-12 16:59 [LTP] prototyping new library synchronization Cyril Hrubis
     [not found] ` <54DDD96D.3020304@redhat.com>
2015-02-13 16:29   ` Cyril Hrubis [this message]
     [not found] ` <234052409.12380641.1424077348107.JavaMail.zimbra@redhat.com>
2015-02-16 10:50   ` Cyril Hrubis
2015-02-18 11:14 ` Cyril Hrubis
     [not found]   ` <1801010187.15219396.1424359733914.JavaMail.zimbra@redhat.com>
2015-02-19 15:35     ` Cyril Hrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150213162915.GA8996@rei.suse.de \
    --to=chrubis@suse.cz \
    --cc=jjaburek@redhat.com \
    --cc=ltp-list@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox