replace semaphore counters by generation counters
silent warnings
Merge pull request #20 from fxdupont/generation

Replace semaphore counters by generation counters