pipe.c
ubixos/types.h
sys/sysproto.h
sys/thread.h
sys/pipe.h
sys/kern_descrip.h
lib/kprintf.h
assert.h
sys/thread.h
src/sys/kernel/pipe.c
ubixos/types.h
sys/_types.h
vfs/file.h
sys/pipe.h
vfs/mount.h
lib/kprintf.h
sys/kern_descrip.h
assert.h
ubixfs/dirCache.h
sys/sysproto.h
sys/signal.h
int int pipe (struct thread *td, struct pipe_args *uap) pipe struct thread * td struct pipe_args * uap

HACK

file::f_flag
falloc
file::fd
FREAD
FWRITE
thread::td_retval

    /*****************************************************************************************
    Copyright(c)2002-2004TheUbixOSProject
    Allrightsreserved.

    Redistributionanduseinsourceandbinaryforms,withorwithoutmodification,are
    permittedprovidedthatthefollowingconditionsaremet:

    Redistributionsofsourcecodemustretaintheabovecopyrightnotice,thislistof
    conditions,thefollowingdisclaimerandthelistofauthors.Redistributionsinbinary
    formmustreproducetheabovecopyrightnotice,thislistofconditions,thefollowing
    disclaimerandthelistofauthorsinthedocumentationand/orothermaterialsprovided
    withthedistribution.NeitherthenameoftheUbixOSProjectnorthenamesofits
    contributorsmaybeusedtoendorseorpromoteproductsderivedfromthissoftware
    withoutspecificpriorwrittenpermission.

    THISSOFTWAREISPROVIDEDBYTHECOPYRIGHTHOLDERSANDCONTRIBUTORS"ASIS"ANDANY
    EXPRESSORIMPLIEDWARRANTIES,INCLUDING,BUTNOTLIMITEDTO,THEIMPLIEDWARRANTIESOF
    MERCHANTABILITYANDFITNESSFORAPARTICULARPURPOSEAREDISCLAIMED.INNOEVENTSHALL
    THECOPYRIGHTOWNERORCONTRIBUTORSBELIABLEFORANYDIRECT,INDIRECT,INCIDENTAL,
    SPECIAL,EXEMPLARY,ORCONSEQUENTIALDAMAGES(INCLUDING,BUTNOTLIMITEDTO,PROCUREMENT
    OFSUBSTITUTEGOODSORSERVICES;LOSSOFUSE,DATA,ORPROFITS;ORBUSINESSINTERRUPTION)
    HOWEVERCAUSEDANDONANYTHEORYOFLIABILITY,WHETHERINCONTRACT,STRICTLIABILITY,OR
    TORT(INCLUDINGNEGLIGENCEOROTHERWISE)ARISINGINANYWAYOUTOFTHEUSEOFTHIS
    SOFTWARE,EVENIFADVISEDOFTHEPOSSIBILITYOFSUCHDAMAGE.

    $Id: pipe_8c.xml 88 2016-01-12 00:11:29Z reddawg $

    *****************************************************************************************/

    #include<ubixos/types.h>
    #include<sys/sysproto.h>
    #include<sys/thread.h>
    #include<sys/pipe.h>
    #include<sys/kern_descrip.h>
    #include<lib/kprintf.h>
    #include<assert.h>

    intpipe(structthread*td,structpipe_args*uap){
    structfile*rf,*wf;
    intfd=0x0;
    falloc(td,&rf,&fd);
    rf->f_flag=FREAD|FWRITE;
    td->td_retval[0]=fd;
    falloc(td,&wf,&fd);
    wf->f_flag=FREAD|FWRITE;
    td->td_retval[1]=fd;
    return(0x0);
    }

    /***
    END
    ***/