Re: [PATCH v3] Threaded grep

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fredrik Kuivinen schrieb:
> On Mon, Jan 18, 2010 at 12:11, Johannes Sixt <j.sixt@xxxxxxxxxxxxx> wrote:
>> Fredrik Kuivinen schrieb:
>>> +     pthread_mutex_unlock(&grep_lock);
>>> +     pthread_cond_signal(&cond_add);
>> Please swap these two lines, so that pthread_cond_signal() is called while
>> the lock is held.
> 
> May I ask why? (just curious)

Because our pthreads_cond_* functions on Windows are not POSIXly correct
and work reliably only when pthread_cond_signal() is called while the
mutex is held.

-- Hannes
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]