FFmpeg
Data Structures | Macros | Typedefs | Functions
os2threads.h File Reference
#include <os2.h>
#include <stdlib.h>
#include <time.h>
#include <sys/builtin.h>
#include <sys/fmutex.h>
#include "libavutil/attributes.h"
#include "libavutil/common.h"

Go to the source code of this file.

Data Structures

struct  pthread_t
 
struct  pthread_cond_t
 
struct  pthread_once_t
 

Macros

#define INCL_DOS
 
#define INCL_DOSERRORS
 
#define PTHREAD_MUTEX_INITIALIZER   _FMUTEX_INITIALIZER
 
#define PTHREAD_ONCE_INIT   {0, _FMUTEX_INITIALIZER}
 

Typedefs

typedef void pthread_attr_t
 
typedef _fmutex pthread_mutex_t
 
typedef void pthread_mutexattr_t
 
typedef void pthread_condattr_t
 

Functions

static void thread_entry (void *arg)
 
static av_always_inline int pthread_create (pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg)
 
static av_always_inline int pthread_join (pthread_t thread, void **value_ptr)
 
static av_always_inline int pthread_mutex_init (pthread_mutex_t *mutex, const pthread_mutexattr_t *attr)
 
static av_always_inline int pthread_mutex_destroy (pthread_mutex_t *mutex)
 
static av_always_inline int pthread_mutex_lock (pthread_mutex_t *mutex)
 
static av_always_inline int pthread_mutex_unlock (pthread_mutex_t *mutex)
 
static av_always_inline int pthread_cond_init (pthread_cond_t *cond, const pthread_condattr_t *attr)
 
static av_always_inline int pthread_cond_destroy (pthread_cond_t *cond)
 
static av_always_inline int pthread_cond_signal (pthread_cond_t *cond)
 
static av_always_inline int pthread_cond_broadcast (pthread_cond_t *cond)
 
static av_always_inline int pthread_cond_timedwait (pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime)
 
static av_always_inline int pthread_cond_wait (pthread_cond_t *cond, pthread_mutex_t *mutex)
 
static av_always_inline int pthread_once (pthread_once_t *once_control, void(*init_routine)(void))
 

Detailed Description

os2threads to pthreads wrapper

Definition in file os2threads.h.

Macro Definition Documentation

◆ INCL_DOS

#define INCL_DOS

Definition at line 29 of file os2threads.h.

◆ INCL_DOSERRORS

#define INCL_DOSERRORS

Definition at line 30 of file os2threads.h.

◆ PTHREAD_MUTEX_INITIALIZER

#define PTHREAD_MUTEX_INITIALIZER   _FMUTEX_INITIALIZER

Definition at line 56 of file os2threads.h.

◆ PTHREAD_ONCE_INIT

#define PTHREAD_ONCE_INIT   {0, _FMUTEX_INITIALIZER}

Definition at line 71 of file os2threads.h.

Typedef Documentation

◆ pthread_attr_t

typedef void pthread_attr_t

Definition at line 51 of file os2threads.h.

◆ pthread_mutex_t

typedef _fmutex pthread_mutex_t

Definition at line 53 of file os2threads.h.

◆ pthread_mutexattr_t

typedef void pthread_mutexattr_t

Definition at line 54 of file os2threads.h.

◆ pthread_condattr_t

typedef void pthread_condattr_t

Definition at line 64 of file os2threads.h.

Function Documentation

◆ thread_entry()

static void thread_entry ( void *  arg)
static

Definition at line 73 of file os2threads.h.

Referenced by pthread_create().

◆ pthread_create()

static av_always_inline int pthread_create ( pthread_t thread,
const pthread_attr_t attr,
void *(*)(void *)  start_routine,
void *  arg 
)
static

◆ pthread_join()

static av_always_inline int pthread_join ( pthread_t  thread,
void **  value_ptr 
)
static

◆ pthread_mutex_init()

static av_always_inline int pthread_mutex_init ( pthread_mutex_t mutex,
const pthread_mutexattr_t attr 
)
static

◆ pthread_mutex_destroy()

static av_always_inline int pthread_mutex_destroy ( pthread_mutex_t mutex)
static

◆ pthread_mutex_lock()

static av_always_inline int pthread_mutex_lock ( pthread_mutex_t mutex)
static

Definition at line 119 of file os2threads.h.

Referenced by append_buffer(), async_buffer_task(), async_close(), async_lock(), async_read_internal(), async_seek(), async_unlock(), at_write_packet(), av_thread_message_flush(), av_thread_message_queue_nb_elems(), av_thread_message_queue_recv(), av_thread_message_queue_send(), av_thread_message_queue_set_err_recv(), av_thread_message_queue_set_err_send(), cleanup(), decklink_write_video_packet(), demux_done(), enc_open(), enc_stats_write(), event_handler(), ff_decklink_packet_queue_flush(), ff_decklink_packet_queue_get(), ff_decklink_packet_queue_peekpts(), ff_decklink_packet_queue_put(), ff_decklink_packet_queue_size(), ff_frame_thread_encoder_free(), ff_frame_thread_free(), ff_jni_get_env(), ff_thread_await_progress(), ff_thread_finish_setup(), ff_thread_receive_frame(), ff_thread_report_progress(), ff_thread_video_encode_frame(), ff_vk_glslang_init(), fifo_consumer_thread(), fifo_write_packet(), filter_done(), frame_worker_thread(), get_buffer(), glslc_uninit(), iec61883_callback(), iec61883_read_packet(), iec61883_receive_task(), init(), lock_frame(), lock_frames(), lock_queue(), mux_done(), park_frame_worker_threads(), pthread_cond_timedwait(), pthread_cond_wait(), qsv_internal_session_check_init(), sch_filter_receive(), sch_mux_receive_finish(), sch_mux_stream_ready(), sch_start(), sch_wait(), decklink_output_callback::ScheduledFrameCompleted(), select_voice(), send_to_enc_sq(), send_to_mux(), set_async_error(), submit_packet(), task_wrapper(), thread_get_buffer_internal(), tq_receive(), tq_receive_finish(), tq_send(), tq_send_finish(), udp_close(), udp_read(), udp_write(), uninit(), vtenc_q_pop(), vtenc_q_push(), wait_for_state(), waiter_set(), waiter_wait(), and worker().

◆ pthread_mutex_unlock()

static av_always_inline int pthread_mutex_unlock ( pthread_mutex_t mutex)
static

Definition at line 126 of file os2threads.h.

Referenced by append_buffer(), async_buffer_task(), async_close(), async_lock(), async_read_internal(), async_seek(), async_unlock(), at_write_packet(), av_thread_message_flush(), av_thread_message_queue_nb_elems(), av_thread_message_queue_recv(), av_thread_message_queue_send(), av_thread_message_queue_set_err_recv(), av_thread_message_queue_set_err_send(), cleanup(), decklink_write_video_packet(), demux_done(), enc_open(), enc_stats_write(), event_handler(), ff_decklink_packet_queue_flush(), ff_decklink_packet_queue_get(), ff_decklink_packet_queue_peekpts(), ff_decklink_packet_queue_put(), ff_decklink_packet_queue_size(), ff_frame_thread_encoder_free(), ff_frame_thread_free(), ff_jni_get_env(), ff_thread_await_progress(), ff_thread_finish_setup(), ff_thread_receive_frame(), ff_thread_report_progress(), ff_thread_video_encode_frame(), ff_vk_glslang_init(), fifo_consumer_thread(), fifo_write_packet(), filter_done(), frame_worker_thread(), get_buffer(), glslc_uninit(), iec61883_callback(), iec61883_read_packet(), iec61883_receive_task(), init(), mux_done(), park_frame_worker_threads(), pthread_cond_timedwait(), pthread_cond_wait(), qsv_internal_session_check_init(), queue_callback(), sch_filter_receive(), sch_mux_receive_finish(), sch_mux_stream_ready(), sch_start(), sch_wait(), decklink_output_callback::ScheduledFrameCompleted(), select_voice(), send_to_enc_sq(), send_to_mux(), set_async_error(), submit_packet(), task_wrapper(), thread_get_buffer_internal(), tq_receive(), tq_receive_finish(), tq_send(), tq_send_finish(), udp_close(), udp_read(), udp_write(), uninit(), unlock_frame(), unlock_frames(), unlock_queue(), vtenc_q_pop(), vtenc_q_push(), wait_for_state(), waiter_set(), waiter_wait(), and worker().

◆ pthread_cond_init()

static av_always_inline int pthread_cond_init ( pthread_cond_t cond,
const pthread_condattr_t attr 
)
static

◆ pthread_cond_destroy()

static av_always_inline int pthread_cond_destroy ( pthread_cond_t cond)
static

◆ pthread_cond_signal()

static av_always_inline int pthread_cond_signal ( pthread_cond_t cond)
static

◆ pthread_cond_broadcast()

static av_always_inline int pthread_cond_broadcast ( pthread_cond_t cond)
static

◆ pthread_cond_timedwait()

static av_always_inline int pthread_cond_timedwait ( pthread_cond_t cond,
pthread_mutex_t mutex,
const struct timespec *  abstime 
)
static

Definition at line 170 of file os2threads.h.

Referenced by sch_wait(), and udp_read().

◆ pthread_cond_wait()

static av_always_inline int pthread_cond_wait ( pthread_cond_t cond,
pthread_mutex_t mutex 
)
static

◆ pthread_once()

static av_always_inline int pthread_once ( pthread_once_t once_control,
void(*)(void)  init_routine 
)
static

Definition at line 210 of file os2threads.h.

Referenced by ff_jni_get_env(), and vtenc_init().