Changeset afa6e74 in mainline for libc/generic


Ignore:
Timestamp:
2006-05-16T23:37:58Z (20 years ago)
Author:
Jakub Vana <jakub.vana@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
04a73cdf
Parents:
6efe0ddf
Message:

Earliest version of Userspace Framebuffer driver, with stream support in libc.
Also Virtual framebuffers made as split on main fb and its usage by streams

(please test it and report)

Location:
libc/generic
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • libc/generic/as.c

    r6efe0ddf rafa6e74  
    7070
    7171static size_t heapsize = 0;
     72static size_t maxheapsize = (size_t)(-1);
    7273/* Start of heap linker symbol */
    7374extern char _heap;
     
    9293        if (incr < 0 && incr+heapsize > heapsize)
    9394                return NULL;
     95        /* Check for user limit */
     96        if ((maxheapsize!=(size_t)(-1)) && (heapsize + incr)>maxheapsize) return NULL;
    9497
    9598        rc = as_area_resize(&_heap, heapsize + incr,0);
     
    104107        return res;
    105108}
     109
     110void *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  
    9393        return EOF;
    9494}
    95 
     95/*
    9696ssize_t write(int fd, const void * buf, size_t count)
    9797{
    9898        return (ssize_t) __SYSCALL3(SYS_IO, (sysarg_t) fd, (sysarg_t) buf, (sysarg_t) count);
    99 }
     99}*/
    100100
    101101
     102
     103
  • libc/generic/libc.c

    r6efe0ddf rafa6e74  
    3232#include <malloc.h>
    3333#include <psthread.h>
     34#include <io/stream.h>
     35
     36int __DONT_OPEN_STDIO__;
    3437
    3538/* We should probably merge libc and libipc together */
     
    4245void __main(void) {
    4346        tcb_t *tcb;
     47       
     48        if(!__DONT_OPEN_STDIO__)
     49        {
     50                open("stdin",0);
     51                open("stdout",0);
     52                open("stderr",0);
     53        }       
    4454       
    4555        tcb = __make_tls();
Note: See TracChangeset for help on using the changeset viewer.