Changeset 1368
- Timestamp:
- Apr 15, 2004, 12:54:39 AM (21 years ago)
- Location:
- trunk/src/emx/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/include/emx/io.h
-
Property cvs2svn:cvs-rev
changed from
1.7
to1.8
r1367 r1368 131 131 #define _IOWIDE 0x00010000 132 132 133 /** This bit is set for standard streams which should not be closed by _fcloseall(). */ 134 #define _IONOCLOSEALL 0x00020000 135 133 136 134 137 #define _FLUSH_FLUSH (-1) 135 138 #define _FLUSH_FILL (-2) 136 137 struct _FILE;138 139 struct _file2140 {141 struct _FILE *owner;142 #if defined (_SYS_RMUTEX_H)143 _rmutex rsem;144 #else145 char rsem_ersatz[16];146 #endif147 };148 139 149 140 #define nbuf(s) (((s)->_flags & _IOBUFMASK) == _IOBUFNONE) … … 163 154 struct streamvec 164 155 { 165 struct _FILE *vec; 166 struct streamvec *next; 167 int n; 156 /** Number of free entries in the vector. */ 157 int cFree; 158 /** Pointer to the previous node in the list. */ 159 struct streamvec *pPrev; 160 /** Array of file stream structure. */ 161 struct _FILE *aFiles; 162 /** Pointer to the next entry in the list */ 163 struct streamvec *pNext; 164 /** Number of entries in the vector. */ 165 int cFiles; 168 166 }; 169 167 … … 177 175 178 176 extern struct streamvec *_streamvec_head; 177 extern struct streamvec *_streamvec_tail; 179 178 extern int _io_ninherit; 180 179 extern struct fdvec _fdvec_head; … … 195 194 196 195 #define STREAM_LOCK(f) \ 197 (_rmutex_request (&(f)->_ more->rsem, _FMR_IGNINT) != 0 \196 (_rmutex_request (&(f)->__u.__rsem, _FMR_IGNINT) != 0 \ 198 197 ? abort () : (void)0) 199 198 200 199 #define STREAM_UNLOCK(f) \ 201 (_rmutex_release (&(f)->_ more->rsem) != 0 ? abort () : (void)0)200 (_rmutex_release (&(f)->__u.__rsem) != 0 ? abort () : (void)0) 202 201 203 202 #define STREAM_LOCK_NOWAIT(f) \ 204 (_rmutex_request (&(f)->_ more->rsem, _FMR_NOWAIT) == 0)205 206 #define STREAM_UNLOCKED(f) _rmutex_available (&(f)->_ more->rsem)203 (_rmutex_request (&(f)->__u.__rsem, _FMR_NOWAIT) == 0) 204 205 #define STREAM_UNLOCKED(f) _rmutex_available (&(f)->__u.__rsem) 207 206 208 207 #endif /* defined (_SYS_RMUTEX_H) */ … … 330 329 331 330 int __libc_FHEnsureHandles(int fh); 331 int __libc_FHMoreHandles(void); 332 332 int __libc_FHAllocate(int fh, unsigned fFlags, int cb, PLIBCFHOPS pOps, PLIBCFH *ppFH, int *pfh); 333 333 int __libc_FHClose(int fh); … … 351 351 struct _FILE *_newstream (void); 352 352 int _output (struct _FILE *, __const__ char *, char *); 353 void _setdummymore (struct _FILE *, struct _file2 *);354 int _setmore (struct _FILE *, int);355 353 int _stream_read (int, void *, size_t); 356 354 int _stream_write (int, __const__ void *, size_t); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/stdio.h
-
Property cvs2svn:cvs-rev
changed from
1.10
to1.11
r1367 r1368 180 180 typedef struct _FILE 181 181 { 182 char * _ptr; 183 char * _buffer; 184 int _rcount; 185 int _wcount; 186 int _handle; 187 int _flags; 188 int _buf_size; 189 int _tmpidx; 190 int _pid; 191 char _char_buf; 192 unsigned char _ungetc_count; 193 short _mbstate; 194 int (*_flush)(struct _FILE *, int); 195 struct _file2 *_more; 182 char * _ptr; 183 char * _buffer; 184 int _rcount; 185 int _wcount; 186 int _handle; 187 int _flags; 188 int _buf_size; 189 int _tmpidx; 190 int _pid; 191 char _char_buf; 192 unsigned char _ungetc_count; 193 short _mbstate; 194 int (*_flush)(struct _FILE *, int); 195 196 /** The Mutex Semaphore. */ 197 union 198 { 199 #if defined (_SYS_RMUTEX_H) 200 _rmutex __rsem; 201 #endif 202 char __rsem_ersatz[16]; 203 } __u; 204 /** Pointer to the stream vector which thie FILE belongs to. 205 * This member is the first which should not be zeroed by _newstream()! */ 206 void *__pSV; 196 207 } FILE; 197 208 … … 538 549 539 550 int _fcloseall (void); 540 FILE *_fassign (FILE *, FILE *);541 551 FILE *_fdopen (int, __const__ char *); 542 552 int _fgetchar (void); -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.