public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
From: Will Bryant <will.bryant@ecosm.com>
To: pthreads-win32@sources.redhat.com
Subject: Re: Borland C++Builder support
Date: Fri, 06 Aug 2004 13:31:00 -0000	[thread overview]
Message-ID: <41138855.1010605@ecosm.com> (raw)
In-Reply-To: <200408031004.i73A4qlB013157@www2.pochta.ru>

Gianluca wrote:

>I have built the library with the Will Bryant's bmakefile.
>I've received a bunch of warnings but it was OK.
>I put the PthreadBC.dll on Windows directory, I included
>PthreadBC.lib in my .bpr project, I compiled and linked the 
>program below.
>
>#include <stdio.h>
>#include <stdlib.h>
>#include <pthread.h>
>
>void*  function( void*  arg )
>{
>   printf( "This is thread %d\n", pthread_self() );
>   return( 0 );
>}
>
>int main( void )
>{
>   pthread_attr_t attr;
>
>   pthread_attr_init( &attr );
>   pthread_attr_setdetachstate(
>      &attr, PTHREAD_CREATE_DETACHED );
>   pthread_create( NULL, &attr, &function, NULL );
>  
>
In general (ie. not for pthreads-win32 specifically), you need to 
declare a pthread_id_t and pass it's address as the first argument to 
pthread_create.  Try making that change first.

  reply	other threads:[~2004-08-06 13:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-03 10:04 Gianluca
2004-08-06 13:31 ` Will Bryant [this message]
2004-08-06 16:55   ` Ross Johnson
2004-08-07  2:52     ` Will Bryant
2004-08-07  2:50   ` Will Bryant
  -- strict thread matches above, loose matches on Subject: below --
2004-06-14  4:30 Will Bryant

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=41138855.1010605@ecosm.com \
    --to=will.bryant@ecosm.com \
    --cc=pthreads-win32@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).