CoolPotOS/apps/include/cpos.h

43 lines
842 B
C
Raw Permalink Normal View History

2024-09-01 20:09:41 +08:00
#ifndef CRASHPOWEROS_CPOS_H
#define CRASHPOWEROS_CPOS_H
2024-09-01 20:21:00 +08:00
#include "ctype.h"
2024-09-01 20:09:41 +08:00
struct sysinfo{
char* osname;
char* kenlname;
char* cpu_vendor;
char* cpu_name;
unsigned int phy_mem_size;
unsigned int pci_device;
unsigned int frame_width;
unsigned int frame_height;
2024-09-01 20:21:00 +08:00
uint32_t year;
uint32_t mon;
uint32_t day;
uint32_t hour;
uint32_t min;
uint32_t sec;
2024-09-01 20:09:41 +08:00
};
#include "syscall.h"
#include "stdlib.h"
static inline struct sysinfo* get_sysinfo(){
return syscall_sysinfo();
}
static inline void free_info(struct sysinfo *info){
free(info->kenlname);
free(info->osname);
free(info->cpu_name);
free(info->cpu_vendor);
free(info);
}
2024-09-08 22:43:05 +08:00
static inline int exec_elf(const char* filename,const char* args,int is_async){
return syscall_exec(filename,args,is_async);
2024-09-06 00:16:50 +08:00
}
2024-09-01 20:09:41 +08:00
#endif