public inbox for rda@sourceware.org
 help / color / mirror / Atom feed
From: Vinu Dev <vinudev@gmail.com>
To: rda@sources.redhat.com
Subject: Help required on rda [FRV]
Date: Wed, 06 Apr 2005 10:58:00 -0000	[thread overview]
Message-ID: <18aafe4c05040603574ebfbd61@mail.gmail.com> (raw)

Dear Jimb,
 I Appreciate your contribution to redhat on rda,i have problem using
rda compilied for FRV target,while debugging thread application using
rda and gdb compilied for FRV,there is a delay in thread creation when
compared to creation of thread running the prog on console.
 Can u pls guide me in solving this problem

Thread program used:thread.c

#include <stdio.h>
#include <pthread.h>
#include <sys/time.h>
#include <assert.h>

long initial_start_time;
long initial_end_time;

void *do_nothing(void *arg)
{
 struct timeval t;
 struct timezone tz;

 gettimeofday(&t, &tz);
printf("%d: Hello World!\n", arg);
   return NULL;
}

#define NUM_THREADS 1
int main(void)
{
   int i;
   pthread_t tid[NUM_THREADS];

 struct timeval t_start;
 struct timezone tz_start;

 struct timeval t_end;
 struct timezone tz_end;
 gettimeofday(&t_start, &tz_start);
  printf("Start  time %llu\n", t_start.tv_sec);
 initial_start_time = t_start.tv_sec;

   for (i = 0; i < NUM_THREADS; i++)
{
       printf("Creating thread %d\n", i);
   pthread_create(&tid[i], NULL, do_nothing, NULL);
}

   for(i =  0; i < NUM_THREADS; i++)
     pthread_join(tid[i], NULL);
 gettimeofday(&t_end, &tz_start);
  printf("End  time %llu\n", t_end.tv_sec);
 initial_end_time = t_end.tv_sec;

   return 0;
}

At target
#rda 1234 thread
Creating thread 0
Start  time 4054105993896787986
End  time 4054106032587143688
Total time take by the thread is time in sec 38654705694
Total time take by the thread is time in usec 1546188226560057
0: Hello World!
<wait_all_threads: 272 has exited>
<wait_all_threads: 272 has disappeared>
<wait_all_threads: 272 has disappeared>

At host
#frv-gdb thread
(gdb) target remote 192.168.1.174:1234
Remote debugging using 192.168.1.174:1234
0x00004de0 in ?? ()
(gdb) cont
Continuing.
[New Thread 16384]

Program exited normally.
(gdb)

Iam using RH9 at host side and at target its FRV kernel[2.4.24]

I would wait for ur reply.

Regards,
Vinay

             reply	other threads:[~2005-04-06 10:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-06 10:58 Vinu Dev [this message]
2005-04-06 20:06 ` Jim Blandy
2005-04-07  5:01   ` Vinu Dev
2005-04-27  8:47     ` Jim Blandy
     [not found]       ` <18aafe4c05042803374d2b517b@mail.gmail.com>
2005-05-16  4:20         ` Vinu Dev
2005-05-16 21:14           ` Jim Blandy

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=18aafe4c05040603574ebfbd61@mail.gmail.com \
    --to=vinudev@gmail.com \
    --cc=rda@sources.redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).