From: Peter Slacik <peter.slacik@tatramed.sk>
To: "Burkhardt, Glenn" <Glenn.Burkhardt@goodrich.com>
Cc: satish <satishjadav@gmail.com>,
pthreads-win32 <pthreads-win32@sourceware.org>
Subject: Re: error C2678 and C2440
Date: Fri, 14 Dec 2007 14:48:00 -0000 [thread overview]
Message-ID: <476289D8.2030708@tatramed.sk> (raw)
In-Reply-To: <35737E0536AA3D4BA26F10F103C8ABF807964975@nhc0ex13.goodrich.root.local>
From "The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004
Edition",
http://www.opengroup.org/onlinepubs/009695399/functions/pthread_equal.html:
> *RATIONALE*
>
> Implementations may choose to define a thread ID as a structure. This
> allows additional flexibility and robustness over using an *int*. For
> example, a thread ID could include a sequence number that allows
> detection of "dangling IDs" (copies of a thread ID that has been
> detached). Since the C language does not support comparison on
> structure types, the pthread_equal() function is provided to compare
> thread IDs.
>
>
With regards
Peter
PS: I'm resending this again, my original emails were not plain text, sorry.
Burkhardt, Glenn wrote:
> Look at the declaration for 'pthread_t' in pthread.h. It's a structure,
> not a pointer or an integer:
>
> /*
> * Generic handle type - intended to extend uniqueness beyond
> * that available with a simple pointer. It should scale for either
> * IA-32 or IA-64.
> */
> typedef struct {
> void * p; /* Pointer to actual object */
> unsigned int x; /* Extra information - reuse count etc
> */
> } ptw32_handle_t;
>
> typedef ptw32_handle_t pthread_t;
>
> I can't say I like this either. All other implementations I've seen use
> a pointer for pthread_t. It must be a Windows thing.
>
>
>> -----Original Message-----
>> From: pthreads-win32-owner@sourceware.org
>> [mailto:pthreads-win32-owner@sourceware.org] On Behalf Of satish
>> Sent: Friday, December 14, 2007 4:11 AM
>> To: pthreads-win32@sourceware.org
>> Subject: error C2678 and C2440
>>
>> Hi,
>> I am porting my multi threading(using pthread) Linux project
>> to windows. The compiler is MS VC++ 2005.
>> I am using pthread-win32, downloaded from
>> "http://sourceware.org/pthreads-win32/".
>> For version, here is a line from pthread.h "#define
>> PTW32_VERSION 2,7,0,0"
>>
>> The project compilation is almost done but I am getting few
>> errors related to pthread.
>>
>> [...]
>>
>> Can you please tell me the reason behind these errors?
>> I will be very thankful to you.
>>
>> Regards
>> Satish
>>
>>
next prev parent reply other threads:[~2007-12-14 13:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-14 13:29 satish
2007-12-14 13:47 ` Burkhardt, Glenn
2007-12-14 14:48 ` Peter Slacik [this message]
2007-12-16 4:06 ` Dennis Foreman
2007-12-14 13:49 ` Peter Slacik
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=476289D8.2030708@tatramed.sk \
--to=peter.slacik@tatramed.sk \
--cc=Glenn.Burkhardt@goodrich.com \
--cc=pthreads-win32@sourceware.org \
--cc=satishjadav@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).