public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Rishikesh K Rajak <risrajak@linux.vnet.ibm.com>
To: naresh kamboju <naresh.kernel@gmail.com>
Cc: ltp-list <ltp-list@lists.sourceforge.net>
Subject: Re: [LTP] [PATCH] Synchronization required before release the lock: sem_post/8-1.c
Date: Tue, 23 Mar 2010 10:09:40 +0530	[thread overview]
Message-ID: <20100323043940.GA4384@linux.vnet.ibm.com> (raw)
In-Reply-To: <f5a7b3811003221150w11edbf02xade0f97ecb98a6ff@mail.gmail.com>

On Tue, Mar 23, 2010 at 12:20:33AM +0530, naresh kamboju wrote:
> On Mon, Mar 22, 2010 at 1:55 PM, Rishikesh K Rajak
> Hi Rishi,
> > can you send your patch against today's git ?
> please find the patch below and attached to this e-mail.

Hi Naresh,

Still i am not able to apply it cleanly.

In our git repo we are not finding this : 
"
-        /* Step 3 Implementation */
"

Can you pull latest next git branch and then create a patch and send it to me?
-Rishi

> Signed-off-by: Naresh Kamboju < naresh.kernel@gmail.com >
> 
> ---
>  testcases/open_posix_testsuite/conformance/interfaces/sem_post/8-1.c
> |   11 	6 +	5 -	0 !
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> Index: b/testcases/open_posix_testsuite/conformance/interfaces/sem_post/8-1.c
> ===================================================================
> --- a/testcases/open_posix_testsuite/conformance/interfaces/sem_post/8-1.c
> +++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_post/8-1.c
> @@ -175,13 +175,13 @@ int main()
>  	}
>  	fprintf(stderr, "P: child_2: %d forked\n", c_2);
> 
> -        /* Step 3 Implementation */
>  	/* Make sure the two children has been waiting */	
> -	do {
> +	/*do {
> +		sleep();
>  		sem_getvalue(sem_1, &val);
>  		//printf("val = %d\n", val);
>  	} while (val != 1);
> -
> +	*/
>  	c_3 = fork();
>  	if (c_3 == 0)
>  	{
> @@ -190,12 +190,13 @@ int main()
>  	}
>  	fprintf(stderr, "P: child_3: %d forked\n", c_3);
>  	
> -        /* Step 3 Implementation */
>  	/* Make sure child 3 has been waiting for the lock */	
> -	do {
> +	/*do {
> +		sleep();
>  		sem_getvalue(sem_1, &val);
>  		//printf("val = %d\n", val);
>  	} while (val != 0);
> +	*/
> 
>  	/* Synchronization required before release the lock */
>  	sleep(1);
> 
> 
> Best regards
> Naresh Kamboju
> >
> > -Rishi
> >>
> >> Best regards
> >> Naresh Kamboju
> >> >
> >> > Signed-off-by: Naresh Kamboju < naresh.kernel@gmail.com >
> >> > ---
> >> >  testcases/open_posix_testsuite/conformance/interfaces/sem_post/8-1.c
> >> > |    2  1 +     1 -     0 !
> >> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >> >
> >> > Index: b/testcases/open_posix_testsuite/conformance/interfaces/sem_post/8-1.c
> >> > ===================================================================
> >> > --- a/testcases/open_posix_testsuite/conformance/interfaces/sem_post/8-1.c
> >> > +++ b/testcases/open_posix_testsuite/conformance/interfaces/sem_post/8-1.c
> >> > @@ -161,7 +161,6 @@ int main()
> >> >        }
> >> >        fprintf(stderr, "P: child_1:%d forked\n", c_1);
> >> >
> >> > -       sleep(1);
> >> >        c_2 = fork();
> >> >        if (c_2 == 0)
> >> >        {
> >> > @@ -198,6 +197,7 @@ int main()
> >> >                //printf("val = %d\n", val);
> >> >        } while (val != 0);
> >> >        */
> >> > +       sleep(1);
> >> >        /* Ok, let's release the lock */
> >> >        fprintf(stderr, "P: release lock\n");
> >> >        sem_post(sem);
> >> >
> >> >
> >> > please let me know if you have any issues.
> >> >
> >> > Best regards,
> >> > Naresh Kamboju
> >> >> Thanks,
> >> >> -Garrett
> >> >>
> >> >
> >
> >
> >
> > --
> > Thanks & Regards
> > Rishi
> > LTP Maintainer
> > IBM, LTC, Bangalore
> > Please join IRC #ltp @ irc.freenode.net
> >



-- 
Thanks & Regards
Rishi
LTP Maintainer
IBM, LTC, Bangalore
Please join IRC #ltp @ irc.freenode.net

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2010-03-23  4:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-25 13:45 [LTP] [PATCH] Synchronization required before release the lock: sem_post/8-1.c naresh kamboju
2010-03-02  8:50 ` Rishikesh K Rajak
2010-03-02 15:08   ` naresh kamboju
     [not found]     ` <20100303045624.GB10185@linux.vnet.ibm.com>
2010-03-03  6:00       ` naresh kamboju
2010-03-03  7:03         ` Rishikesh K Rajak
2010-03-03  9:18           ` Garrett Cooper
2010-03-03  9:45             ` Rishikesh K Rajak
2010-03-03 11:33               ` naresh kamboju
2010-03-03 11:42                 ` Garrett Cooper
2010-03-03 11:49                   ` naresh kamboju
2010-03-03 11:55                     ` Garrett Cooper
2010-03-03 13:45                       ` naresh kamboju
2010-03-08 10:57                         ` naresh kamboju
2010-03-22  8:25                           ` Rishikesh K Rajak
2010-03-22 15:20                             ` naresh kamboju
2010-03-22 18:50                             ` naresh kamboju
2010-03-23  4:39                               ` Rishikesh K Rajak [this message]
2010-03-23  8:04                                 ` naresh kamboju

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=20100323043940.GA4384@linux.vnet.ibm.com \
    --to=risrajak@linux.vnet.ibm.com \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=naresh.kernel@gmail.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