pthread_create and mach ports (solved)
pthread_create and mach ports (solved)
- Subject: pthread_create and mach ports (solved)
- From: email@hidden
- Date: Fri, 27 Jan 2006 23:36:42 +0100
I created threads of the detached type and did not set the correct attributes
---
. ) groetjes perry
Begin doorgestuurd bericht:
Van: email@hidden
Datum: 25 januari 2006 14:28:17 GMT+01:00
Aan: email@hidden
Onderwerp: pthread_create and mach ports
hi,
we are moving a program from codewarrior to gcc/xcode...in this project:
we switched from cooperative threads (macintosh thread manager) to
posix-threads
but we see unexpected behaviour when we follow the programs execution
with 'top'
when a new thread is created with phtread_create we see in the '#th'
column a value one higher (ok)
the column '#prts' (mach ports) also increases by one (ok)
when the thread subsequently calls 'usleep' the columns '#prts' again
increases by one (ok)
when the thread finishes (last statement is a call of 'pthread_exit')
the column '#th' decreases by one (again ok)
however:
the column '#prts' continues to show the increased value!
since our program creates a lot of threads this looks like a fairly big
problem
because also the column 'vsize' shows increasingly large values
any clues on how to move on?
---
Groetjes, Perry
Zeno Arnhem BV
Ir. P.F.M. Winkel
Utrechtseweg 151
6862 AH Oosterbeek
The Netherlands
Tel. +31(0)26-3892550
http://www.zenosoftware.nl
---
. ) groetjes perry
Begin doorgestuurd bericht:
Van: email@hidden
Datum: 25 januari 2006 14:28:17 GMT+01:00
Aan: email@hidden
Onderwerp: pthread_create and mach ports
hi,
we are moving a program from codewarrior to gcc/xcode...in this project:
we switched from cooperative threads (macintosh thread manager) to
posix-threads
but we see unexpected behaviour when we follow the programs execution
with 'top'
when a new thread is created with phtread_create we see in the '#th'
column a value one higher (ok)
the column '#prts' (mach ports) also increases by one (ok)
when the thread subsequently calls 'usleep' the columns '#prts' again
increases by one (ok)
when the thread finishes (last statement is a call of 'pthread_exit')
the column '#th' decreases by one (again ok)
however:
the column '#prts' continues to show the increased value!
since our program creates a lot of threads this looks like a fairly big
problem
because also the column 'vsize' shows increasingly large values
any clues on how to move on?
---
Groetjes, Perry
Zeno Arnhem BV
Ir. P.F.M. Winkel
Utrechtseweg 151
6862 AH Oosterbeek
The Netherlands
Tel. +31(0)26-3892550
http://www.zenosoftware.nl
---
. ) groetjes perry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden