OpenCores
URL https://opencores.org/ocsvn/plasma/plasma/trunk

Subversion Repositories plasma

[/] [plasma/] [trunk/] [kernel/] [rtos.h] - Diff between revs 416 and 436

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 416 Rev 436
Line 28... Line 28...
#endif
#endif
#ifdef WIN32
#ifdef WIN32
   #define _CRT_SECURE_NO_WARNINGS 1
   #define _CRT_SECURE_NO_WARNINGS 1
   #include <stdio.h>
   #include <stdio.h>
   #include <assert.h>
   #include <assert.h>
 
   #include <setjmp.h>
   #define _LIBC
   #define _LIBC
   uint32 MemoryRead(uint32 Address);
   uint32 MemoryRead(uint32 Address);
   void MemoryWrite(uint32 Address, uint32 Value);
   void MemoryWrite(uint32 Address, uint32 Value);
#else
#else
   #define MemoryRead(A) (*(volatile uint32*)(A))
   #define MemoryRead(A) (*(volatile uint32*)(A))
Line 90... Line 91...
void *memmove(void *dst, const void *src, unsigned long bytes);
void *memmove(void *dst, const void *src, unsigned long bytes);
int   memcmp(const void *cs, const void *ct, unsigned long bytes);
int   memcmp(const void *cs, const void *ct, unsigned long bytes);
void *memset(void *dst, int c, unsigned long bytes);
void *memset(void *dst, int c, unsigned long bytes);
int   abs(int n);
int   abs(int n);
int   atoi(const char *s);
int   atoi(const char *s);
unsigned int rand(void);
int   rand(void);
void  srand(unsigned int seed);
void  srand(unsigned int seed);
long  strtol(const char *s, char **end, int base);
long  strtol(const char *s, char **end, int base);
char *itoa(int num, char *dst, int base);
char *itoa(int num, char *dst, int base);
 
 
#ifndef NO_ELLIPSIS
#ifndef NO_ELLIPSIS
 
   typedef char* va_list;
 
   #define va_start(AP,P) (AP=(char*)&(P)+sizeof(char*))
 
   #define va_arg(AP,T) (*(T*)((AP+=sizeof(T))-sizeof(T)))
 
   #define va_end(AP)
   int sprintf(char *s, const char *format, ...);
   int sprintf(char *s, const char *format, ...);
   int sscanf(const char *s, const char *format, ...);
   int sscanf(const char *s, const char *format, ...);
#endif
#endif
 
 
#define printf     UartPrintf
#define printf     UartPrintf
Line 144... Line 149...
   void gmtimeDst(time_t dstTimeIn, time_t dstTimeOut);
   void gmtimeDst(time_t dstTimeIn, time_t dstTimeOut);
   void gmtimeDstSet(time_t *tp, time_t *dstTimeIn, time_t *dstTimeOut);
   void gmtimeDstSet(time_t *tp, time_t *dstTimeIn, time_t *dstTimeOut);
#endif
#endif
 
 
/***************** Assembly **************/
/***************** Assembly **************/
 
#ifndef WIN32
typedef uint32 jmp_buf[20];
typedef uint32 jmp_buf[20];
extern uint32 OS_AsmInterruptEnable(uint32 state);
 
extern void OS_AsmInterruptInit(void);
 
extern int setjmp(jmp_buf env);
extern int setjmp(jmp_buf env);
extern void longjmp(jmp_buf env, int val);
extern void longjmp(jmp_buf env, int val);
 
#endif
 
extern uint32 OS_AsmInterruptEnable(uint32 state);
 
extern void OS_AsmInterruptInit(void);
extern uint32 OS_AsmMult(uint32 a, uint32 b, unsigned long *hi);
extern uint32 OS_AsmMult(uint32 a, uint32 b, unsigned long *hi);
extern void *OS_Syscall(uint32 value);
extern void *OS_Syscall(uint32 value);
 
 
/***************** Heap ******************/
/***************** Heap ******************/
typedef struct OS_Heap_s OS_Heap_t;
typedef struct OS_Heap_s OS_Heap_t;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.