Re: [PATCH rcu 11/15] rcutorture: Add reader_flavor parameter for SRCU readers

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

 



>>>  
>>>  static int srcu_torture_read_lock(void)
>>>  {
>>> -	if (cur_ops == &srcud_ops)
>>> -		return srcu_read_lock_nmisafe(srcu_ctlp);
>>> -	else
>>> -		return srcu_read_lock(srcu_ctlp);
>>> +	int idx;
>>> +	int ret = 0;
>>> +
>>> +	if ((reader_flavor & 0x1) || !(reader_flavor & 0x7)) {
>>
>> Minor: Maybe use macros in place of 0x1, 0x2, 0x7 as a cleanup later.
> 
> Hmmm...
> 
> I could move SRCU_READ_FLAVOR_* to include/linux/srcu.h and make
> rcutorture use those.  Plus have a combined mask for the instances of 0x7.
> 
> Or is there a better way?
> 

Yes, I was thinking the same. This looks good.


- Neeraj




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux