- Timestamp:
- 2006-05-16T23:37:58Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 04a73cdf
- Parents:
- 6efe0ddf
- Location:
- libc
- Files:
-
- 3 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
libc/Makefile
r6efe0ddf rafa6e74 53 53 generic/io/io.c \ 54 54 generic/io/printf.c \ 55 generic/io/stream.c \ 55 56 generic/io/sprintf.c \ 56 57 generic/io/snprintf.c \ -
libc/Makefile.toolchain
r6efe0ddf rafa6e74 28 28 29 29 DEFS = -DARCH=$(ARCH) 30 CFLAGS = -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror-O3 -nostdlib -nostdinc -I$(LIBC_PREFIX)/include30 CFLAGS = -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -O3 -nostdlib -nostdinc -I$(LIBC_PREFIX)/include 31 31 LFLAGS = -M -N $(SOFTINT_PREFIX)/softint.a 32 32 AFLAGS = 33 33 #-Werror 34 34 35 35 ## Setup platform configuration -
libc/generic/as.c
r6efe0ddf rafa6e74 70 70 71 71 static size_t heapsize = 0; 72 static size_t maxheapsize = (size_t)(-1); 72 73 /* Start of heap linker symbol */ 73 74 extern char _heap; … … 92 93 if (incr < 0 && incr+heapsize > heapsize) 93 94 return NULL; 95 /* Check for user limit */ 96 if ((maxheapsize!=(size_t)(-1)) && (heapsize + incr)>maxheapsize) return NULL; 94 97 95 98 rc = as_area_resize(&_heap, heapsize + incr,0); … … 104 107 return res; 105 108 } 109 110 void *set_maxheapsize(size_t mhs) 111 { 112 maxheapsize=mhs; 113 /* Return pointer to area not managed by sbrk */ 114 return (void *)&_heap + maxheapsize; 115 116 } -
libc/generic/io/io.c
r6efe0ddf rafa6e74 93 93 return EOF; 94 94 } 95 95 /* 96 96 ssize_t write(int fd, const void * buf, size_t count) 97 97 { 98 98 return (ssize_t) __SYSCALL3(SYS_IO, (sysarg_t) fd, (sysarg_t) buf, (sysarg_t) count); 99 } 99 }*/ 100 100 101 101 102 103 -
libc/generic/libc.c
r6efe0ddf rafa6e74 32 32 #include <malloc.h> 33 33 #include <psthread.h> 34 #include <io/stream.h> 35 36 int __DONT_OPEN_STDIO__; 34 37 35 38 /* We should probably merge libc and libipc together */ … … 42 45 void __main(void) { 43 46 tcb_t *tcb; 47 48 if(!__DONT_OPEN_STDIO__) 49 { 50 open("stdin",0); 51 open("stdout",0); 52 open("stderr",0); 53 } 44 54 45 55 tcb = __make_tls(); -
libc/include/as.h
r6efe0ddf rafa6e74 32 32 #include <types.h> 33 33 #include <task.h> 34 #include <kernel/arch/mm/as.h> 34 35 #include <kernel/mm/as.h> 36 37 #define USER_ADDRESS_SPACE_SIZE_ARCH (USER_ADDRESS_SPACE_END_ARCH-USER_ADDRESS_SPACE_START_ARCH+1) 35 38 36 39 extern void *as_area_create(void *address, size_t size, int flags); 37 40 extern int as_area_resize(void *address, size_t size, int flags); 38 41 extern int as_area_destroy(void *address); 42 extern void *set_maxheapsize(size_t mhs); 39 43 40 44 #endif -
libc/include/ipc/services.h
r6efe0ddf rafa6e74 38 38 #define SERVICE_FRAME_BUFFER 2 39 39 #define SERVICE_KEYBOARD 3 40 #define SERVICE_VIDEO 4 40 41 41 42 #endif
Note:
See TracChangeset
for help on using the changeset viewer.