public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
* RE: Posix
@ 2001-06-01  7:03 Bossom, John
  0 siblings, 0 replies; 3+ messages in thread
From: Bossom, John @ 2001-06-01  7:03 UTC (permalink / raw)
  To: 'Alexey Sushkov', pthreads-win32

You are incorrect.
You do not have to allocate any memory on Win32 to make the calls.

The behaviour is exactly the same, from a user's point of view.
(Otherwise, it wouldn't be a very useful library if you had to do things
 differently from a coding point of view)


-----Original Message-----
From: Alexey Sushkov [ mailto:sushkov@dins.ru ]
Sent: June 1, 2001 9:44 AM
To: pthreads-win32@sourceware.cygnus.com
Subject: Posix


Hello,

I am porting some app from Linux to Win32. The app uses functions:
pthread_mutex_init(&myId, NULL) pthread_attr_init(&myAttributes) and so on.
Before calling functions it does not allocate memory for myId and
myAttributes variables. As I understand this in correct behavior in Linux
environment because memory is allocated inside the functions but wrong in
Win32 because it is necessary allocate memory before calling the functions.
Am I right? If yes then my question is: why in Win32 you have not emulated
Linux's behavior?

Thanks,
Alexey Sushkov.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: Posix
       [not found] <3B17C9EF.F52BB5AB@hawksoft.com>
@ 2001-06-04  1:26 ` Alexey Sushkov
  0 siblings, 0 replies; 3+ messages in thread
From: Alexey Sushkov @ 2001-06-04  1:26 UTC (permalink / raw)
  To: pthreads-win32; +Cc: 'Phil Frisbie, Jr.'

Hello Phil,
I've got it.
Yes, I had problems with running some app. The app is crashed inside POSIX
Threads for Win32 Library. After I allocate memory before calling xxx_init
functions the problem is disappeared. Now I understand that the problem not
in using POSIX function but the memory is corrupted somewhere else.

Thank you,
Alexey Sushkov.



-----Original Message-----
From: Phil Frisbie, Jr. [ mailto:phil@hawksoft.com ]
Sent: Friday, June 01, 2001 7:59 PM
To: Alexey Sushkov
Subject: Re: Posix


Alexey Sushkov wrote:
>
> Hello Phil,
>
> Thank you for quick answer. Yes I'am using POSIX Threads for Win32
Library.

Sorry for that question, I did not notice that your message came from the
pthreads-win32 mail list. Did I reply to the list, or directly to you? I was
not
yet fully awake this morning :)

> I have new question: are you allocate memory before using the functions?

No. Both pthread_attr_init and pthread_mutex_init allocate the structures.

> If yes it means that the app I am porting has bugs because there no memory
> allocation before using the functions. There is passed only a pointer to
> pointer into the functions.

You only pass a pointer to pointer for both.

Are you having a problem compiling your app? Or running it?

> With best regards,
> Alexey Sushkov.


Phil Frisbie, Jr.
Lead Developer, Hawk Software
http://www.hawksoft.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Posix
@ 2001-06-01  5:43 Alexey Sushkov
  0 siblings, 0 replies; 3+ messages in thread
From: Alexey Sushkov @ 2001-06-01  5:43 UTC (permalink / raw)
  To: pthreads-win32

Hello,

I am porting some app from Linux to Win32. The app uses functions:
pthread_mutex_init(&myId, NULL) pthread_attr_init(&myAttributes) and so on.
Before calling functions it does not allocate memory for myId and
myAttributes variables. As I understand this in correct behavior in Linux
environment because memory is allocated inside the functions but wrong in
Win32 because it is necessary allocate memory before calling the functions.
Am I right? If yes then my question is: why in Win32 you have not emulated
Linux's behavior?

Thanks,
Alexey Sushkov.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-06-04  1:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-01  7:03 Posix Bossom, John
     [not found] <3B17C9EF.F52BB5AB@hawksoft.com>
2001-06-04  1:26 ` Posix Alexey Sushkov
  -- strict thread matches above, loose matches on Subject: below --
2001-06-01  5:43 Posix Alexey Sushkov

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).