Ignore:
Timestamp:
Jan 26, 2017, 6:05:38 PM (3 years ago)
Author:
cameron
Message:

FileSink? kernel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/IR_Gen/CBuilder.h

    r5267 r5280  
    3131        mMod = m;
    3232    }
    33        
     33   
    3434    llvm::Value * CreateMalloc(llvm::Type * type, llvm::Value * size);
    35 
     35   
    3636    llvm::Value * CreateAlignedMalloc(llvm::Type * type, llvm::Value * size, const unsigned alignment);
    37 
     37   
    3838    void CreateFree(llvm::Value * const ptr);
    39 
     39   
    4040    void CreateAlignedFree(llvm::Value * const ptr, const bool ptrMayBeNull = false);
    41 
     41   
    4242    llvm::Value * CreateRealloc(llvm::Value * ptr, llvm::Value * size);
    43 
     43   
    4444    void CreateMemZero(llvm::Value * ptr, llvm::Value * size, const unsigned alignment = 1);
    4545
     
    5050    }
    5151   
     52    // stdio.h functions
     53    //
     54    //  Create a call to:  FILE *fopen(const char *filename, const char *mode);
     55    llvm::Value * CreateFOpenCall(llvm::Value * filename, llvm::Value * mode);
     56    //  Create a call to:  size_t fwrite(const void *ptr, size_t size, size_t nitems, FILE *stream));
     57    llvm::Value * CreateFWriteCall(llvm::Value * ptr, llvm::Value * size, llvm::Value * nitems, llvm::Value * stream);
     58    //  Create a call to:  int fclose ( FILE * stream );
     59    llvm::Value * CreateFCloseCall(llvm::Value * stream);
     60   
    5261    llvm::Function * GetPrintf();
    5362
     63    //  Create calls to unistd.h functions.
     64    //
     65    //  Create a call to:  ssize_t write(int fildes, const void *buf, size_t nbyte);
    5466    llvm::Value * CreateWriteCall(llvm::Value * fildes, llvm::Value * buf, llvm::Value * nbyte);
    5567   
     68    //  Posix thread (pthread.h) functions.
     69    //
     70    //  Create a call to:  int pthread_create(pthread_t *thread, const pthread_attr_t *attr,
     71    //                    void *(*start_routine)(void*), void *arg);
    5672    llvm::Value * CreatePThreadCreateCall(llvm::Value * thread, llvm::Value * attr, llvm::Function * start_routine, llvm::Value * arg);
    57 
     73   
     74    //  Create a call to:  void pthread_exit(void *value_ptr);
    5875    llvm::Value * CreatePThreadExitCall(llvm::Value * value_ptr);
    59 
     76   
     77    //  Create a call to:  int pthread_join(pthread_t thread, void **value_ptr);
    6078    llvm::Value * CreatePThreadJoinCall(llvm::Value * thread, llvm::Value * value_ptr);
    6179   
     
    7189   
    7290    llvm::PointerType * getVoidPtrTy() const;
     91    llvm::PointerType * getFILEptrTy();
    7392   
    7493    inline unsigned getCacheAlignment() const {
     
    84103    unsigned            mCacheLineAlignment;
    85104    llvm::IntegerType * mSizeType;
     105    llvm::StructType *  mFILEtype;
    86106};
    87107
Note: See TracChangeset for help on using the changeset viewer.