newlib: update

git-svn-id: svn://kolibrios.org@5808 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2015-09-06 08:56:26 +00:00
parent 1ea8f85a42
commit 2d6646029b
3 changed files with 19 additions and 12 deletions

View File

@ -193,6 +193,17 @@ uint32_t get_tick_count(void)
return val; 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 static inline
oskey_t get_key(void) oskey_t get_key(void)
{ {

View File

@ -102,7 +102,7 @@ typedef _fpos64_t fpos64_t;
#ifdef __BUFSIZ__ #ifdef __BUFSIZ__
#define BUFSIZ __BUFSIZ__ #define BUFSIZ __BUFSIZ__
#else #else
#define BUFSIZ 1024 #define BUFSIZ 4096
#endif #endif
#ifdef __FOPEN_MAX__ #ifdef __FOPEN_MAX__

View File

@ -2,6 +2,10 @@
#ifndef __KOS_IO_H__ #ifndef __KOS_IO_H__
#define __KOS_IO_H__ #define __KOS_IO_H__
#ifdef __cplusplus
extern "C" {
#endif
#pragma pack(push, 1) #pragma pack(push, 1)
typedef struct typedef struct
{ {
@ -65,19 +69,8 @@ int read_file(const char *path, void *buff,
int write_file(const char *path,const void *buff, int write_file(const char *path,const void *buff,
size_t offset, size_t count, size_t *writes); size_t offset, size_t count, size_t *writes);
int set_file_size(const char *path, unsigned size); 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)) ; 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) static inline void set_cwd(const char* cwd)
{ {
__asm__ __volatile__( __asm__ __volatile__(
@ -85,4 +78,7 @@ static inline void set_cwd(const char* cwd)
::"a"(30),"b"(1),"c"(cwd)); ::"a"(30),"b"(1),"c"(cwd));
}; };
#ifdef __cplusplus
}
#endif
#endif #endif