Macros | Functions | Variables
vxworks/osal.c File Reference
#include <time.h>
#include <sys/time.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <osal.h>
#include <vxWorks.h>
#include <taskLib.h>
Include dependency graph for vxworks/osal.c:

Go to the source code of this file.

Macros

#define ECAT_STACK_SIZE   10000 /* Stack size for high performance task */
 
#define ECAT_TASK_PRIO_HIGH   20 /* Priority for high performance network task */
 
#define ECAT_TASK_PRIO_LOW   80 /* Priority for high performance network task */
 
#define timeradd(a, b, result)
 
#define timercmp(a, b, CMP)
 
#define timersub(a, b, result)
 
#define use_task_delay   1
 
#define USECS_PER_SEC   1000000
 

Functions

ec_timet osal_current_time (void)
 
void osal_free (void *ptr)
 
int osal_gettimeofday (struct timeval *tv, struct timezone *tz)
 
void * osal_malloc (size_t size)
 
int osal_thread_create (void *thandle, int stacksize, void *func, void *param)
 
int osal_thread_create_rt (void *thandle, int stacksize, void *func, void *param)
 
void osal_time_diff (ec_timet *start, ec_timet *end, ec_timet *diff)
 
boolean osal_timer_is_expired (osal_timert *self)
 
void osal_timer_start (osal_timert *self, uint32 timeout_usec)
 
int osal_usleep (uint32 usec)
 

Variables

static int ecatTaskIndex = 0
 
static int ecatTaskOptions = VX_SUPERVISOR_MODE | VX_UNBREAKABLE
 

Macro Definition Documentation

◆ ECAT_STACK_SIZE

#define ECAT_STACK_SIZE   10000 /* Stack size for high performance task */

Definition at line 46 of file vxworks/osal.c.

◆ ECAT_TASK_PRIO_HIGH

#define ECAT_TASK_PRIO_HIGH   20 /* Priority for high performance network task */

Definition at line 44 of file vxworks/osal.c.

◆ ECAT_TASK_PRIO_LOW

#define ECAT_TASK_PRIO_LOW   80 /* Priority for high performance network task */

Definition at line 45 of file vxworks/osal.c.

◆ timeradd

#define timeradd (   a,
  b,
  result 
)
Value:
do { \
(result)->tv_sec = (a)->tv_sec + (b)->tv_sec; \
(result)->tv_usec = (a)->tv_usec + (b)->tv_usec; \
if ((result)->tv_usec >= 1000000) \
{ \
++(result)->tv_sec; \
(result)->tv_usec -= 1000000; \
} \
} while (0)

Definition at line 21 of file vxworks/osal.c.

◆ timercmp

#define timercmp (   a,
  b,
  CMP 
)
Value:
(((a)->tv_sec == (b)->tv_sec) ? \
((a)->tv_usec CMP (b)->tv_usec) : \
((a)->tv_sec CMP (b)->tv_sec))

Definition at line 17 of file vxworks/osal.c.

◆ timersub

#define timersub (   a,
  b,
  result 
)
Value:
do { \
(result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \
(result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \
if ((result)->tv_usec < 0) { \
--(result)->tv_sec; \
(result)->tv_usec += 1000000; \
} \
} while (0)

Definition at line 31 of file vxworks/osal.c.

◆ use_task_delay

#define use_task_delay   1

Definition at line 51 of file vxworks/osal.c.

◆ USECS_PER_SEC

#define USECS_PER_SEC   1000000

Definition at line 41 of file vxworks/osal.c.

Function Documentation

◆ osal_current_time()

ec_timet osal_current_time ( void  )

Definition at line 86 of file vxworks/osal.c.

◆ osal_free()

void osal_free ( void *  ptr)

Definition at line 143 of file vxworks/osal.c.

◆ osal_gettimeofday()

int osal_gettimeofday ( struct timeval *  tv,
struct timezone *  tz 
)

Definition at line 73 of file vxworks/osal.c.

◆ osal_malloc()

void* osal_malloc ( size_t  size)

Definition at line 138 of file vxworks/osal.c.

◆ osal_thread_create()

int osal_thread_create ( void *  thandle,
int  stacksize,
void *  func,
void *  param 
)

Definition at line 148 of file vxworks/osal.c.

◆ osal_thread_create_rt()

int osal_thread_create_rt ( void *  thandle,
int  stacksize,
void *  func,
void *  param 
)

Definition at line 168 of file vxworks/osal.c.

◆ osal_time_diff()

void osal_time_diff ( ec_timet start,
ec_timet end,
ec_timet diff 
)

Definition at line 97 of file vxworks/osal.c.

◆ osal_timer_is_expired()

boolean osal_timer_is_expired ( osal_timert self)

Definition at line 124 of file vxworks/osal.c.

◆ osal_timer_start()

void osal_timer_start ( osal_timert self,
uint32  timeout_usec 
)

Definition at line 109 of file vxworks/osal.c.

◆ osal_usleep()

int osal_usleep ( uint32  usec)
inline

Definition at line 54 of file vxworks/osal.c.

Variable Documentation

◆ ecatTaskIndex

int ecatTaskIndex = 0
static

Definition at line 48 of file vxworks/osal.c.

◆ ecatTaskOptions

int ecatTaskOptions = VX_SUPERVISOR_MODE | VX_UNBREAKABLE
static

Definition at line 47 of file vxworks/osal.c.



soem
Author(s): Arthur Ketels and M.J.G. van den Molengraft
autogenerated on Mon Feb 28 2022 23:46:58