Re: [PATCH v4 4/7] kernel-shark-qt: Make kshark_read_at() non-static.

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

 



On Wed, 19 Sep 2018 17:36:54 +0300
"Yordan Karadzhov (VMware)" <y.karadz@xxxxxxxxx> wrote:


> +/**
> + * @brief A thread-safe read of a record from a specific offset.
> + *
> + * @param kshark_ctx: Input location for the session context pointer.
> + * @param offset: the offset into the file to find the record.
> + *
> + * @returns The returned pevent_record must be freed.
> + */
> +struct tep_record *kshark_read_at(struct kshark_context *kshark_ctx,
> +				  uint64_t offset)
>  {
>  	/*
>  	 * It turns that tracecmd_read_at() is not thread-safe.

This code still has:

	/*
	 * It turns that tracecmd_read_at() is not thread-safe.
	 * TODO: Understand why and see if this can be fixed.
	 * For the time being use a mutex to protect the access.
	 */

Remind me to explain to you why this is the case. It wont be easy to
have it fixed.

-- Steve



[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux