|
Boost :
|
- Next message: Howard Hinnant: "Re: [boost] [thread] RFC standard proposed mutex, read-write mutex, condition"
- Previous message: Howard Hinnant: "Re: [boost] [thread] RFC standard proposed mutex, read-write mutex, condition"
- In reply to: Howard Hinnant: "Re: [boost] [thread] RFC standard proposed mutex, read-write mutex, condition"
- Next in thread: Howard Hinnant: "Re: [boost] [thread] RFC standard proposed mutex, read-write mutex, condition"
- Reply: Howard Hinnant: "Re: [boost] [thread] RFC standard proposed mutex, read-write mutex, condition"
Howard Hinnant:
> On Aug 21, 2007, at 5:14 PM, Peter Dimov wrote:
>
>> void __cndcheck_init( void * pc, void * pm )
>> {
>> __cndcheck_state[ (size_t)pc % 17041 ] = { pc, pm }; // atomic
>> store
>> }
>
> So what do you do about collisions?
Nothing; if there's a collision, I miss the opportunity to check. The
"permissive" spec allows me to do that. If I had to throw on mutex mismatch,
this implementation would be non-conforming. I can tune the magic number
17041 to strike the best ratio of accuracy vs space, and I can vary it
slightly on each run to redistribute the collisions.
- Next message: Howard Hinnant: "Re: [boost] [thread] RFC standard proposed mutex, read-write mutex, condition"
- Previous message: Howard Hinnant: "Re: [boost] [thread] RFC standard proposed mutex, read-write mutex, condition"
- In reply to: Howard Hinnant: "Re: [boost] [thread] RFC standard proposed mutex, read-write mutex, condition"
- Next in thread: Howard Hinnant: "Re: [boost] [thread] RFC standard proposed mutex, read-write mutex, condition"
- Reply: Howard Hinnant: "Re: [boost] [thread] RFC standard proposed mutex, read-write mutex, condition"
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk