/uspace/trunk/libc/generic/as.c |
---|
69,7 → 69,6 |
} |
static size_t heapsize = 0; |
static size_t maxheapsize = (size_t)(-1); |
/* Start of heap linker symbol */ |
extern char _heap; |
92,8 → 91,6 |
/* Check for too small values */ |
if (incr < 0 && incr+heapsize > heapsize) |
return NULL; |
/* Check for user limit */ |
if ((maxheapsize!=(size_t)(-1)) && (heapsize + incr)>maxheapsize) return NULL; |
rc = as_area_resize(&_heap, heapsize + incr,0); |
if (rc != 0) |
106,11 → 103,3 |
return res; |
} |
void *set_maxheapsize(size_t mhs) |
{ |
maxheapsize=mhs; |
/* Return pointer to area not managed by sbrk */ |
return (void *)&_heap + maxheapsize; |
} |
/uspace/trunk/libc/generic/libc.c |
---|
31,10 → 31,7 |
#include <thread.h> |
#include <malloc.h> |
#include <psthread.h> |
#include <io/stream.h> |
int __DONT_OPEN_STDIO__; |
/* We should probably merge libc and libipc together */ |
extern void _ipc_init(void); |
45,13 → 42,6 |
void __main(void) { |
tcb_t *tcb; |
if(!__DONT_OPEN_STDIO__) |
{ |
open("stdin",0); |
open("stdout",0); |
open("stderr",0); |
} |
tcb = __make_tls(); |
__tcb_set(tcb); |
psthread_setup(tcb); |
/uspace/trunk/libc/generic/io/stream.c |
---|
File deleted |
/uspace/trunk/libc/generic/io/io.c |
---|
92,12 → 92,10 |
return EOF; |
} |
/* |
ssize_t write(int fd, const void * buf, size_t count) |
{ |
return (ssize_t) __SYSCALL3(SYS_IO, (sysarg_t) fd, (sysarg_t) buf, (sysarg_t) count); |
}*/ |
} |
/uspace/trunk/libc/include/ipc/fb.h |
---|
File deleted |
/uspace/trunk/libc/include/ipc/services.h |
---|
37,6 → 37,5 |
#define SERVICE_PCI 1 |
#define SERVICE_FRAME_BUFFER 2 |
#define SERVICE_KEYBOARD 3 |
#define SERVICE_VIDEO 4 |
#endif |
/uspace/trunk/libc/include/as.h |
---|
31,14 → 31,10 |
#include <types.h> |
#include <task.h> |
#include <kernel/arch/mm/as.h> |
#include <kernel/mm/as.h> |
#define USER_ADDRESS_SPACE_SIZE_ARCH (USER_ADDRESS_SPACE_END_ARCH-USER_ADDRESS_SPACE_START_ARCH+1) |
extern void *as_area_create(void *address, size_t size, int flags); |
extern int as_area_resize(void *address, size_t size, int flags); |
extern int as_area_destroy(void *address); |
extern void *set_maxheapsize(size_t mhs); |
#endif |
/uspace/trunk/libc/include/io/stream.h |
---|
File deleted |
/uspace/trunk/libc/Makefile |
---|
52,7 → 52,6 |
generic/futex.c \ |
generic/io/io.c \ |
generic/io/printf.c \ |
generic/io/stream.c \ |
generic/io/sprintf.c \ |
generic/io/snprintf.c \ |
generic/io/vprintf.c \ |
/uspace/trunk/libc/Makefile.toolchain |
---|
27,11 → 27,11 |
# |
DEFS = -DARCH=$(ARCH) |
CFLAGS = -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -O3 -nostdlib -nostdinc -I$(LIBC_PREFIX)/include |
CFLAGS = -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -nostdlib -nostdinc -I$(LIBC_PREFIX)/include |
LFLAGS = -M -N $(SOFTINT_PREFIX)/softint.a |
AFLAGS = |
#-Werror |
## Setup platform configuration |
# |