lkml.org 
[lkml]   [2012]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 3/3] tools lib traceevent: Introduce pevent_strerror
From
Date
On Fri, 2012-06-15 at 18:04 +0900, Namhyung Kim wrote:

>
> > If you need the code to be thread safe, have all errors do:
> >
> > ret = pevent_foo();
> > if (ret < 0) {
> > pevent_strerr_val(ret, buf, buflen);
> >
> >
> > For programs that do not need to be thread safe, then:
> >
> > ret = pevent_foo();
> > if (ret < 0) {
> > pevent_strerr(pevent, buf, buflen);
> >
>
> Do we really need these two? I think having a single API is just
> enough, IMHO.

Hmm, maybe not. I guess I was confused about the need to pass the pevent
into the function. I think we only need the return val. Or is there
other data in the future that you envision will require needing pevent
passed in?

-- Steve




\
 
 \ /
  Last update: 2012-06-15 15:01    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site