[PATCH v16 4/4] eal: add PMU support to tracing library
    Stephen Hemminger 
    stephen at networkplumber.org
       
    Tue Dec  3 22:42:18 CET 2024
    
    
  
On Mon, 18 Nov 2024 08:37:06 +0100
Tomasz Duszynski <tduszynski at marvell.com> wrote:
> +static int
> +add_events(const char *pattern)
> +{
> +	char *token, *copy;
> +	int ret = 0;
> +
> +	copy = strdup(pattern);
> +	if (copy == NULL)
> +		return -ENOMEM;
> +
> +	token = strtok(copy, ",");
Since strtok is not thread safe, either use strtok_r or another
way to parse comma seperated list.
Maybe rte_strsplit could help?
    
    
More information about the dev
mailing list