add lwIP TCP/IP stack as a runtime driver, native socket syscalls, SysGetMemoryStatus replacing CatchAllDebugBucket, fix timeGetTime to return milliseconds, fix SysSleep to interpret argument as milliseconds, SysGetTick now returns microseconds, harden all syscalls against bad user pointers with CopyFromUser/CopyToUser/MmProbeUser throughout, add networking test apps, port-forward 8080 in runa.bat, split LWIP_DRIVER_CFLAGS, add settings.ini to deploy, remove ethernet.c stub
This commit is contained in:
1 parent
18b4dd0f61
commit
df13b8056c
365 files changed
+143263
-1362
No files matched your search
@@ -0,0 +1,51 @@
|
||||
#pragma once
|
||||
#ifndef LWIP_ARCH_SYS_ARCH_H
|
||||
#define LWIP_ARCH_SYS_ARCH_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <lwip/opt.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct sys_sem;
|
||||
typedef struct sys_sem* sys_sem_t;
|
||||
#define SYS_SEM_NULL NULL
|
||||
#define sys_sem_valid(sem) ((sem) && (*(sem) != NULL))
|
||||
#define sys_sem_valid_val(sem) ((sem) != NULL)
|
||||
#define sys_sem_set_invalid(sem) do { if ((sem)) { *(sem) = NULL; } } while (0)
|
||||
#define sys_sem_set_invalid_val(sem) do { (sem) = NULL; } while (0)
|
||||
|
||||
struct sys_mutex;
|
||||
typedef struct sys_mutex* sys_mutex_t;
|
||||
#define sys_mutex_valid(mutex) ((mutex) && (*(mutex) != NULL))
|
||||
#define sys_mutex_valid_val(mutex) ((mutex) != NULL)
|
||||
#define sys_mutex_set_invalid(mutex) do { if ((mutex)) { *(mutex) = NULL; } } while (0)
|
||||
|
||||
struct sys_mbox;
|
||||
typedef struct sys_mbox* sys_mbox_t;
|
||||
#define SYS_MBOX_NULL NULL
|
||||
#define sys_mbox_valid(mbox) ((mbox) && (*(mbox) != NULL))
|
||||
#define sys_mbox_valid_val(mbox) ((mbox) != NULL)
|
||||
#define sys_mbox_set_invalid(mbox) do { if ((mbox)) { *(mbox) = NULL; } } while (0)
|
||||
#define sys_mbox_set_invalid_val(mbox) do { (mbox) = NULL; } while (0)
|
||||
|
||||
/*
|
||||
* lwIP only treats sys_thread_t as an opaque handle. Keep it pointer-sized.
|
||||
*
|
||||
* Do NOT make this a by-value incomplete struct. MSVC may compile callers
|
||||
* that see only the incomplete type with a hidden struct-return parameter,
|
||||
* which shifts sys_thread_new(name, thread, arg, ...) so the callee receives
|
||||
* thread == name and arg == thread. The first tcpip_thread then jumps into
|
||||
* the literal string "tcpip" as code.
|
||||
*/
|
||||
typedef void* sys_thread_t;
|
||||
|
||||
void LwipPortSetTimerQuery(uint64_t (*query_ticks_us)(void));
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LWIP_ARCH_SYS_ARCH_H */
|
||||
Reference in new issue
Block a user