Arax -8d09c51940345c86062e8ef2427c705ae66e5926
A Runtime Framework for Decoupling Applications from Heterogeneous Accelerators
Loading...
Searching...
No Matches
Kv.c File Reference
#include "Kv.h"
#include <stdio.h>
#include <string.h>
+ Include dependency graph for Kv.c:

Go to the source code of this file.

Functions

void utils_kv_init (utils_kv_s *kv)
 
void utils_kv_set (utils_kv_s *kv, void *key, void *value)
 
void ** utils_kv_get (utils_kv_s *kv, void *key)
 

Function Documentation

◆ utils_kv_get()

void ** utils_kv_get ( utils_kv_s * kv,
void * key )

Return &(kv[key]) if found.

Returns NULL if key not found.

Definition at line 35 of file Kv.c.

References utils_kv_s::Pair::key, utils_kv_s::kv, utils_kv_s::lock, utils_kv_s::pairs, utils_spinlock_lock, utils_spinlock_unlock, and utils_kv_s::Pair::value.

◆ utils_kv_init()

void utils_kv_init ( utils_kv_s * kv)

Initialize kv.

Definition at line 5 of file Kv.c.

References utils_kv_s::lock, and utils_spinlock_init.

Referenced by arax_pipe_init().

+ Here is the caller graph for this function:

◆ utils_kv_set()

void utils_kv_set ( utils_kv_s * kv,
void * key,
void * value )

Set kv[key] = value.

Overwrites existing value.

Definition at line 11 of file Kv.c.

References arax_assert, utils_kv_s::Pair::key, utils_kv_s::kv, utils_kv_s::lock, utils_kv_s::pairs, utils_spinlock_lock, utils_spinlock_unlock, and utils_kv_s::Pair::value.

Referenced by arax_plot_register_metric().

+ Here is the caller graph for this function: