Re: [tip:perf/core] perf tools: Protect accesses the dso rbtrees/ lists with a rw lock

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

 



* tip-bot for Arnaldo Carvalho de Melo <tipbot@xxxxxxxxx> wrote:

> +void dsos__add(struct dsos *dsos, struct dso *dso)
> +{
> +	pthread_rwlock_wrlock(&dsos->lock);
> +	__dsos__add(dsos, dso);
> +	pthread_rwlock_unlock(&dsos->lock);
>  }

Please introduce wrappers and use the kernel API names: 
read_lock()/read_unlock()/etc. (and name the mutex primitives 
mutex_lock()/unlock())

That way kernel developers will find their way around the perf locking details 
easily, and we can also use liblockdep to check locking correctness.

Thanks!

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux