On Sunday 07 July 2013, Daniel Lescohier wrote:
> Another option:
> 
> typedef struct {
>     apr_uint32_t stamp;
>     apr_uint32_t counter;
>     apr_uint16_t stamp_fraction;
>     char root[ROOT_SIZE];
> } unique_id_rec;
> 
> where ROOT_SIZE=8, and stamp_fraction is set on every request to
> htons(r->request_time & 0xffff).

If we have a 32bit counter that is incremented atomically, there is 
really no need for the stamp_fraction. 32bit won't overflow in a 
second. But I think the patch proposed by Jan is good enough and does 
not need to use atomic operations.

Reply via email to