1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Context: Use key of thread to store context

This commit is contained in:
winlin 2021-02-05 13:12:20 +08:00
parent 33ab785ce9
commit 102434b3d5
3 changed files with 50 additions and 13 deletions

View file

@ -381,6 +381,21 @@ int srs_mutex_unlock(srs_mutex_t mutex)
return st_mutex_unlock((st_mutex_t)mutex);
}
int srs_key_create(int *keyp, void (*destructor)(void *))
{
return st_key_create(keyp, destructor);
}
int srs_thread_setspecific(int key, void *value)
{
return st_thread_setspecific(key, value);
}
void *srs_thread_getspecific(int key)
{
return st_thread_getspecific(key);
}
int srs_netfd_fileno(srs_netfd_t stfd)
{
return st_netfd_fileno((st_netfd_t)stfd);