Re: [PATCH v2 06/87] trace-cmd library: Add constructor and destructor

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

 



On Thu, 29 Jul 2021 08:08:38 +0300
"Tzvetomir Stoyanov (VMware)" <tz.stoyanov@xxxxxxxxx> wrote:

> Added empty constructor and destructor routines of the trace-cmd
> library. They will be used to initialize and free compression context of
> the library.

This should be folded into the first patch they are used. Patches
should not be broken into just adding skeletons without usage.

-- Steve


> 
> Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@xxxxxxxxx>
> ---
>  lib/trace-cmd/trace-util.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/lib/trace-cmd/trace-util.c b/lib/trace-cmd/trace-util.c
> index b0c98c72..0f49a21a 100644
> --- a/lib/trace-cmd/trace-util.c
> +++ b/lib/trace-cmd/trace-util.c
> @@ -624,3 +624,13 @@ bool tracecmd_is_version_supported(unsigned int version)
>  		return true;
>  	return false;
>  }
> +
> +static void __attribute__ ((constructor)) tracecmd_lib_init(void)
> +{
> +
> +}
> +
> +static void __attribute__((destructor)) tracecmd_lib_free(void)
> +{
> +
> +}




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

  Powered by Linux