gwion-util
utilities for the Gwion project
Loading...
Searching...
No Matches
symbol.h
Go to the documentation of this file.
1
4#pragma once
5
6#include "gwion_thread.h"
7typedef struct Symbol_ *Symbol;
8struct Symbol_ {
10 char name[];
11};
18
19ANN SymTable *new_symbol_table(MemPool p, const size_t sz);
20ANN Symbol insert_symbol(SymTable *const, const m_str) __attribute__((pure));
21
22__attribute__((pure)) ANN static inline m_str s_name(const Symbol s) {
23 return s->name;
24};
25ANN void free_symbols(SymTable *const);
#define ANN
Definition defs.h:18
char * m_str
Definition gwcommon.h:15
cross-platform thread functions
struct MemPool_ * MemPool
size_t sz
Definition symbol.h:15
MemPool p
Definition symbol.h:14
gwtlock_t mutex
Definition symbol.h:13
Symbol sym[]
Definition symbol.h:16
char name[]
Definition symbol.h:10
Symbol next
Definition symbol.h:9
ANN void free_symbols(SymTable *const)
Definition symbol.c:19
__attribute__((pure)) ANN static inline m_str s_name(const Symbol s)
Definition symbol.h:22
ANN SymTable * new_symbol_table(MemPool p, const size_t sz)
Definition symbol.c:5
ANN Symbol insert_symbol(SymTable *const, const m_str) __attribute__((pure))
Definition symbol.c:39
struct SymTable_ SymTable
struct Symbol_ * Symbol
Definition symbol.h:7
pthread_mutex_t gwtlock_t
Definition threadpool.h:11