Changeset a65c28e in rtems
- Timestamp:
- 09/30/98 15:42:46 (25 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- c11f512
- Parents:
- 9dd23877
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/new_chapters/io.t
r9dd23877 ra65c28e 24 24 @item @code{fcntl} - Manipulates an open file descriptor 25 25 @item @code{lseek} - Reposition read/write file offset 26 @item @code{fsync} - XXX27 @item @code{fdatasync} - XXX26 @item @code{fsync} - Synchronize a file's complete in-core state with that on disk 27 @item @code{fdatasync} - synchronize a file's in-core data with that on disk 28 28 @item @code{mount} - Mount a file system 29 29 @item @code{umount} - Unmount file systems … … 92 92 #include <unistd.h> 93 93 94 int dup(int fildes 94 int dup( 95 int fildes 95 96 ); 96 97 @end example … … 178 179 #include <unistd.h> 179 180 180 int close(int fildes 181 int close( 182 int fildes 181 183 ); 182 184 @end example … … 235 237 @table @b 236 238 @item EAGAIN 237 The 239 The O_NONBLOCK flag is set for a file descriptor and the process 240 would be delayed in the I/O operation. 238 241 239 242 @item EBADF … … 311 314 #include <unistd.h> 312 315 313 int write(int fildes, 314 const void *buf, 315 unsigned int nbytes 316 int write( 317 int fildes, 318 const void *buf, 319 unsigned int nbytes 316 320 ); 317 321 @end example … … 332 336 333 337 @item EFBIG 334 The 338 An attempt was made to write to a file that exceeds the maximum file 339 size 335 340 336 341 @item EINTR … … 567 572 568 573 @page 569 @subsection fsync - 574 @subsection fsync - Synchronize a file's complete in-core state with that on disk 570 575 571 576 @subheading CALLING SEQUENCE: … … 574 579 @example 575 580 int fsync( 576 ); 577 @end example 578 @end ifset 579 580 @ifset is-Ada 581 @end ifset 582 583 @subheading STATUS CODES: 584 585 @table @b 586 @item E 587 The 588 589 @end table 590 591 @subheading DESCRIPTION: 592 593 @subheading NOTES: 594 595 @page 596 @subsection fdatasync - 581 int fd 582 ); 583 @end example 584 @end ifset 585 586 @ifset is-Ada 587 @end ifset 588 589 @subheading STATUS CODES: 590 591 On success, zero is returned. On error, -1 is returned, and @code{errno} 592 is set appropriately. 593 594 @table @b 595 @item EBADF 596 @code{fd} is not a valid descriptor open for writing 597 598 @item EINVAL 599 @code{fd} is bound to a special file which does not support support synchronization 600 601 @item EROFS 602 @code{fd} is bound to a special file which does not support support synchronization 603 604 @item EIO 605 An error occurred during synchronization 606 607 @end table 608 609 @subheading DESCRIPTION: 610 611 @code{fsync} copies all in-core parts of a file to disk. 612 613 @subheading NOTES: 614 615 NONE 616 617 @page 618 @subsection fdatasync - synchronize a file's in-core data with that on disk. 597 619 598 620 @subheading CALLING SEQUENCE: … … 601 623 @example 602 624 int fdatasync( 603 ); 604 @end example 605 @end ifset 606 607 @ifset is-Ada 608 @end ifset 609 610 @subheading STATUS CODES: 611 612 @table @b 613 @item E 614 The 615 616 @end table 617 618 @subheading DESCRIPTION: 619 620 @subheading NOTES: 625 int fd 626 ); 627 @end example 628 @end ifset 629 630 @ifset is-Ada 631 @end ifset 632 633 @subheading STATUS CODES: 634 635 On success, zeor is returned. On error, -1 is returned, and @code{errno} is 636 set appropriately. 637 638 @table @b 639 @item EBADF 640 @code{fd} is not a valid file descriptor open for writing. 641 642 @item EINVAL 643 @code{fd} is bound to a special file which dows not support synchronization. 644 645 @item EIO 646 An error occurred during synchronization. 647 648 @item EROFS 649 @code{fd} is bound to a special file which dows not support synchronization. 650 651 @end table 652 653 @subheading DESCRIPTION: 654 655 @code{fdatasync} flushes all data buffers of a file to disk (before the system call 656 returns). It resembles @code{fsync} but is not required to update the metadata such 657 as access time. 658 659 Applications that access databases or log files often write a tiny data fragment 660 (e.g., one line in a log file) and then call @code{fsync} immediately in order to 661 ensure that the written data is physically stored on the harddisk. Unfortunately, 662 fsync will always initiate two write operations: one for the newly written data and 663 another one in order to update the modification time stored in the inode. If the 664 modification time is not a part of the transaction concept @code{fdatasync} can be 665 used to avoid unnecessary inode disk write operations. 666 667 @subheading NOTES: 668 669 NONE 621 670 622 671 @page
Note: See TracChangeset
for help on using the changeset viewer.