All of lore.kernel.org
 help / color / mirror / Atom feed
From: "akshay" <akshay.singh@analog.com>
To: <linux-mips@linux-mips.org>
Subject: pthread uClibc
Date: Fri, 6 Aug 2004 09:43:03 +0530	[thread overview]
Message-ID: <006101c47b6b$abbd6610$5d0d790a@asingh2d01> (raw)


Hi,

I am trying to use pthread on mips based platform.

I have simple program to just create pthreads and when I run my program, it
goes in infinite loop and never comes back.
Though when I hit enter on console, I see following message on console.

pt: assertion failed in manager.c:154.

pt: assertion failed in manager.c:193.

Can someone plz help me here .



Here is the code for my program.
==============================================================
#include <stdio.h>
#include <pthread.h>

void print_message_function( void *ptr );

     pthread_t thread1;
     char *message1 = "Thread 1";

main()
{
     int  iret1, iret2;

    /* Create independant threads each of which will execute function */

     iret1 = pthread_create( &thread1, NULL, (void*)&print_message_function,
(v
oid*) message1);

printf("threads created ....\n");
     /* Wait till threads are complete before main continues. Unless we  */
     /* wait we run the risk of executing an exit which will terminate   */
     /* the process and all threads before the threads have completed.   */

     pthread_join( thread1, NULL);

     printf("Thread 1 returns: %d\n",iret1);
     exit(0);
}

void print_message_function( void *ptr )
{
     char *message;
     message = (char *) ptr;
     printf("%s \n", message);
}





Thanks,
Akshay

WARNING: multiple messages have this Message-ID (diff)
From: "akshay" <akshay.singh@analog.com>
To: linux-mips@linux-mips.org
Subject: pthread uClibc
Date: Fri, 6 Aug 2004 09:43:03 +0530	[thread overview]
Message-ID: <006101c47b6b$abbd6610$5d0d790a@asingh2d01> (raw)
Message-ID: <20040806041303.uoWi6p0DAO2t0-BSFz1sigQOTE1iGDwCoViiFVSxcz0@z> (raw)


Hi,

I am trying to use pthread on mips based platform.

I have simple program to just create pthreads and when I run my program, it
goes in infinite loop and never comes back.
Though when I hit enter on console, I see following message on console.

pt: assertion failed in manager.c:154.

pt: assertion failed in manager.c:193.

Can someone plz help me here .



Here is the code for my program.
==============================================================
#include <stdio.h>
#include <pthread.h>

void print_message_function( void *ptr );

     pthread_t thread1;
     char *message1 = "Thread 1";

main()
{
     int  iret1, iret2;

    /* Create independant threads each of which will execute function */

     iret1 = pthread_create( &thread1, NULL, (void*)&print_message_function,
(v
oid*) message1);

printf("threads created ....\n");
     /* Wait till threads are complete before main continues. Unless we  */
     /* wait we run the risk of executing an exit which will terminate   */
     /* the process and all threads before the threads have completed.   */

     pthread_join( thread1, NULL);

     printf("Thread 1 returns: %d\n",iret1);
     exit(0);
}

void print_message_function( void *ptr )
{
     char *message;
     message = (char *) ptr;
     printf("%s \n", message);
}





Thanks,
Akshay

             reply	other threads:[~2004-08-06  4:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-06  4:13 akshay [this message]
2004-08-06  4:13 ` pthread uClibc akshay
2004-08-06  6:30 ` Ratin Kumar
2004-08-06  6:30   ` Ratin Kumar
  -- strict thread matches above, loose matches on Subject: below --
2004-08-05 13:19 akshay
2004-08-05 13:19 ` akshay
2004-08-05 13:18 akshay
2004-08-05 13:18 ` akshay

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='006101c47b6b$abbd6610$5d0d790a@asingh2d01' \
    --to=akshay.singh@analog.com \
    --cc=linux-mips@linux-mips.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.