Re: POSIX thread question
- From: "David Schwartz" <davids@xxxxxxxxxxxxx>
- Date: 29 Aug 2006 04:24:19 -0700
Jack wrote:
Only the 10 threads' parent process can execute the above line and
destroy the cntr_mutex. The 10 threads can not destroy the cntr_mutex
since they do not execute main() function, right?
In general, a "do not" statement can't justify a "can not" statement.
It would be an error say I "can not" eat a pickle because I "do not"
have any pickles. I can go upstairs to my kitchen and get a pickle.
You are correct that your threads do not execute main and hence do not
destroy the mutex. But they could, if they were coded to do so
(intentionally or by accident).
DS
.
- References:
- POSIX thread question
- From: Jack
- Re: POSIX thread question
- From: Mikko Rauhala
- Re: POSIX thread question
- From: Jack
- POSIX thread question
- Prev by Date: Re: POSIX thread question
- Next by Date: Re: accessing files, devices, in kernel modules
- Previous by thread: Re: POSIX thread question
- Next by thread: Max Thread per process.
- Index(es):
Relevant Pages
|