BeRTOS
kblock_posix.h
Go to the documentation of this file.
00001 
00043 #ifndef KBLOCK_POSIX_H
00044 #define KBLOCK_POSIX_H
00045 
00046 #include "kblock.h"
00047 
00048 #include <stdio.h>
00049 
00050 typedef struct KBlockPosix
00051 {
00052     KBlock b;
00053     FILE *fp;
00054 } KBlockPosix;
00055 
00056 #define KBT_KBLOCKPOSIX MAKE_ID('K', 'B', 'F', 'L')
00057 
00058 
00059 INLINE KBlockPosix *KBLOCKPOSIX_CAST(KBlock *b)
00060 {
00061     ASSERT(b->priv.type == KBT_KBLOCKPOSIX);
00062     return (KBlockPosix *)b;
00063 }
00064 
00065 void kblockposix_init(KBlockPosix *f, FILE *fp, bool hwbuf, void *buf, size_t block_size, block_idx_t block_count);
00066 
00067 #endif /* KBLOCK_POSIX_H */