forked from KolibriOS/kolibrios
newlib: update
git-svn-id: svn://kolibrios.org@5808 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
1ea8f85a42
commit
2d6646029b
@ -193,6 +193,17 @@ uint32_t get_tick_count(void)
|
||||
return val;
|
||||
};
|
||||
|
||||
static inline
|
||||
uint64_t get_ns_count(void)
|
||||
{
|
||||
uint64_t val;
|
||||
__asm__ __volatile__(
|
||||
"int $0x40"
|
||||
:"=A"(val)
|
||||
:"a"(26), "b"(10));
|
||||
return val;
|
||||
};
|
||||
|
||||
static inline
|
||||
oskey_t get_key(void)
|
||||
{
|
||||
|
@ -102,7 +102,7 @@ typedef _fpos64_t fpos64_t;
|
||||
#ifdef __BUFSIZ__
|
||||
#define BUFSIZ __BUFSIZ__
|
||||
#else
|
||||
#define BUFSIZ 1024
|
||||
#define BUFSIZ 4096
|
||||
#endif
|
||||
|
||||
#ifdef __FOPEN_MAX__
|
||||
|
@ -2,6 +2,10 @@
|
||||
#ifndef __KOS_IO_H__
|
||||
#define __KOS_IO_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#pragma pack(push, 1)
|
||||
typedef struct
|
||||
{
|
||||
@ -65,19 +69,8 @@ int read_file(const char *path, void *buff,
|
||||
int write_file(const char *path,const void *buff,
|
||||
size_t offset, size_t count, size_t *writes);
|
||||
int set_file_size(const char *path, unsigned size);
|
||||
void *load_file(const char *path, size_t *len);
|
||||
void unpack(void* packed_data, void* unpacked_data) __attribute__((stdcall)) ;
|
||||
|
||||
static inline int user_free(void *mem)
|
||||
{
|
||||
int val;
|
||||
__asm__ __volatile__(
|
||||
"int $0x40"
|
||||
:"=a"(val)
|
||||
:"a"(68),"b"(12),"c"(mem));
|
||||
return val;
|
||||
}
|
||||
|
||||
static inline void set_cwd(const char* cwd)
|
||||
{
|
||||
__asm__ __volatile__(
|
||||
@ -85,4 +78,7 @@ static inline void set_cwd(const char* cwd)
|
||||
::"a"(30),"b"(1),"c"(cwd));
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user