Hi,

I'm going through txg_hold_open where 'CPU_SEQID' has been used to get the
index into tx_cpu.

#define max_ncpus       64
#define CPU_SEQID       ((uintptr_t)pthread_self() & (max_ncpus - 1))

uint64_t
txg_hold_open(...) {
...
        tc = &tx->tx_cpu[CPU_SEQID];
...
}

Not sure whether it is intended behavior (or) not, but, this 'CPU_SEQID'
macro always get evaluated as 0 in Linux.

Reason is: lower order 8 bits of value returned from pthread_self()
consists of 0's.

Do you guys see any issue here or is that fine this way?

Thanks,
Vishnu

------------------------------------------
openzfs: openzfs-developer
Permalink: 
https://openzfs.topicbox.com/groups/developer/T91226fafa787642a-M00d1b64eacee6f3816a16466
Delivery options: https://openzfs.topicbox.com/groups/developer/subscription

Reply via email to