Changeset afa6e74 in mainline for libc/generic
- Timestamp:
- 2006-05-16T23:37:58Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 04a73cdf
- Parents:
- 6efe0ddf
- Location:
- libc/generic
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
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();
Note:
See TracChangeset
for help on using the changeset viewer.
