TUT HEVC Encoder
Loading...
Searching...
No Matches
Macros | Typedefs | Functions
threads.h File Reference

Abstractions for operating system specific stuff. More...

#include "global.h"
#include <pthread.h>
#include <windows.h>
#include <semaphore.h>
Include dependency graph for threads.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define KVZ_CLOCK_T   struct _FILETIME
 
#define KVZ_GET_TIME(clock_t)   { GetSystemTimeAsFileTime(clock_t); }
 
#define KVZ_CLOCK_T_AS_DOUBLE(ts)   ((double)(((uint64_t)(ts).dwHighDateTime)<<32 | (uint64_t)(ts).dwLowDateTime) / 1e7)
 
#define KVZ_CLOCK_T_DIFF(start, stop)
 
#define KVZ_ATOMIC_INC(ptr)   InterlockedIncrement((volatile LONG*)ptr)
 
#define KVZ_ATOMIC_DEC(ptr)   InterlockedDecrement((volatile LONG*)ptr)
 

Typedefs

typedef sem_t kvz_sem_t
 

Functions

static void kvz_sem_init (kvz_sem_t *sem, int value)
 
static void kvz_sem_wait (kvz_sem_t *sem)
 
static void kvz_sem_post (kvz_sem_t *sem)
 
static void kvz_sem_destroy (kvz_sem_t *sem)
 

Macro Definition Documentation

◆ KVZ_ATOMIC_DEC

#define KVZ_ATOMIC_DEC (   ptr)    InterlockedDecrement((volatile LONG*)ptr)

◆ KVZ_ATOMIC_INC

#define KVZ_ATOMIC_INC (   ptr)    InterlockedIncrement((volatile LONG*)ptr)

◆ KVZ_CLOCK_T

#define KVZ_CLOCK_T   struct _FILETIME

◆ KVZ_CLOCK_T_AS_DOUBLE

#define KVZ_CLOCK_T_AS_DOUBLE (   ts)    ((double)(((uint64_t)(ts).dwHighDateTime)<<32 | (uint64_t)(ts).dwLowDateTime) / 1e7)

◆ KVZ_CLOCK_T_DIFF

#define KVZ_CLOCK_T_DIFF (   start,
  stop 
)
Value:
((double)((((uint64_t)(stop).dwHighDateTime)<<32 | (uint64_t)(stop).dwLowDateTime) - \
(((uint64_t)(start).dwHighDateTime)<<32 | (uint64_t)(start).dwLowDateTime)) / 1e7)
#define MAX_TILES_PER_DIM
Definition global.h:232

◆ KVZ_GET_TIME

#define KVZ_GET_TIME (   clock_t)    { GetSystemTimeAsFileTime(clock_t); }

Typedef Documentation

◆ kvz_sem_t

Function Documentation

◆ kvz_sem_destroy()

static void kvz_sem_destroy ( kvz_sem_t sem)
inlinestatic
Here is the caller graph for this function:

◆ kvz_sem_init()

static void kvz_sem_init ( kvz_sem_t sem,
int  value 
)
inlinestatic
Here is the caller graph for this function:

◆ kvz_sem_post()

static void kvz_sem_post ( kvz_sem_t sem)
inlinestatic
Here is the caller graph for this function:

◆ kvz_sem_wait()

static void kvz_sem_wait ( kvz_sem_t sem)
inlinestatic
Here is the caller graph for this function: