public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: chrubis@suse.cz
To: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
Cc: vasily.isaenko@oracle.com, ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] msgctl11: process message queues by portions
Date: Tue, 11 Feb 2014 15:23:36 +0100	[thread overview]
Message-ID: <20140211142336.GA14876@rei.Home> (raw)
In-Reply-To: <52F9EE70.9040700@oracle.com>

Hi!
> > Technically the idx should be named offset or off.
> >
> >> +	key_t key;
> >> +	int i, count, status;
> >> +	pid_t pid;
> >> +
> >> +	nprocs = no_of_processes;
> >
> > This is hacky, you should either pass the number as a function parameter
> > or in global variable but doing both is messy.
> >
> 
> Yes, it's.... But I need to keep nprocs global, because it's used in the 
> signal handler.

I know, there is a cleanup that depends on it.

> So I either can update nprocs before calling dotest_iteration() (right 
> in main()) or do this inside dotest_iteration().
> 
> I think that doing so inside dotest_iteration() is not an excellent 
> solution but it's compact and this choice should be pretty clear for 
> further maintenance.
> 
> What do you think?

I would prefer setting nprocs right before you call dotest_iteration(),
IMHO that way the code follows the rule of least surprise.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  parent reply	other threads:[~2014-02-11 14:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-16 13:39 [LTP] [PATCH] msgctl11: process message queues by portions Stanislav Kholmanskikh
2014-02-06 13:29 ` chrubis
     [not found]   ` <52F9EE70.9040700@oracle.com>
2014-02-11 14:23     ` chrubis [this message]
2014-02-11 15:19       ` [LTP] [PATCH V2 1/2] msgctl11: cleanup and fflush removed Stanislav Kholmanskikh
2014-02-11 15:19         ` [LTP] [PATCH V2 2/2] msgctl11: process message queues by portions Stanislav Kholmanskikh
2014-02-21 18:11           ` chrubis
     [not found]             ` <530C5E99.6050809@oracle.com>
2014-02-25 12:25               ` chrubis
     [not found]                 ` <530CA0A3.403@oracle.com>
2014-02-25 14:00                   ` chrubis
2014-02-25 14:40                     ` [LTP] [PATCH V3 1/2] msgctl11: cleanup and fflush removed Stanislav Kholmanskikh
2014-02-25 14:40                     ` [LTP] [PATCH V3 2/2] msgctl11: process message queues by portions Stanislav Kholmanskikh
2014-03-05 10:45                       ` chrubis

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=20140211142336.GA14876@rei.Home \
    --to=chrubis@suse.cz \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=stanislav.kholmanskikh@oracle.com \
    --cc=vasily.isaenko@oracle.com \
    /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