Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 2a53f71 in mainline


Ignore:
Timestamp:
2011-07-31T04:59:20Z (10 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master
Children:
27a8d1d
Parents:
11544f4
Message:

Added missing comments to the newly implemented functions.

Location:
uspace/lib/posix
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/stdio.c

    r11544f4 r2a53f71  
    726726 * Rename a file or directory.
    727727 *
    728  * @param old
    729  * @param new
     728 * @param old Old pathname.
     729 * @param new New pathname.
    730730 * @return Zero on success, -1 (with errno set) otherwise.
    731731 */
  • uspace/lib/posix/stdlib.h

    r11544f4 r2a53f71  
    113113extern void posix_free(void *ptr);
    114114
    115 /* Temporary files */
     115/* Temporary Files */
    116116extern int posix_mkstemp(char *tmpl);
    117117
  • uspace/lib/posix/sys/wait.c

    r11544f4 r2a53f71  
    6767
    6868/**
     69 * Wait for any child process to stop or terminate.
    6970 *
    70  * @param stat_ptr
    71  * @return
     71 * @param stat_ptr Location of the final status code of the child process.
     72 * @return ID of the child process for which status is reported,
     73 *     -1 on signal interrupt, (pid_t)-1 otherwise.
    7274 */
    7375posix_pid_t posix_wait(int *stat_ptr)
     
    7981
    8082/**
     83 * Wait for a child process to stop or terminate.
    8184 *
    82  * @param pid
    83  * @param stat_ptr
    84  * @param options
    85  * @return
     85 * @param pid What child process shall the caller wait for. See POSIX manual
     86 *     for details.
     87 * @param stat_ptr Location of the final status code of the child process.
     88 * @param options Constraints of the waiting. See POSIX manual for details.
     89 * @return ID of the child process for which status is reported,
     90 *     -1 on signal interrupt, 0 if non-blocking wait is requested but there is
     91 *     no child process whose status can be reported, (pid_t)-1 otherwise.
    8692 */
    8793posix_pid_t posix_waitpid(posix_pid_t pid, int *stat_ptr, int options)
  • uspace/lib/posix/unistd.c

    r11544f4 r2a53f71  
    186186 * Close a file.
    187187 *
    188  * @param fildes
     188 * @param fildes File descriptor of the opened file.
    189189 * @return 0 on success, -1 on error.
    190190 */
     
    223223 * Requests outstanding data to be written to the underlying storage device.
    224224 *
    225  * @param fildes
     225 * @param fildes File descriptor of the opened file.
     226 * @return Zero on success, -1 otherwise.
    226227 */
    227228int posix_fsync(int fildes)
     
    230231}
    231232
     233/**
     234 * Truncate a file to a specified length.
     235 *
     236 * @param fildes File descriptor of the opened file.
     237 * @param length New length of the file.
     238 * @return Zero on success, -1 otherwise.
     239 */
    232240int posix_ftruncate(int fildes, posix_off_t length)
    233241{
     
    257265}
    258266
     267/**
     268 * Duplicate an open file descriptor.
     269 *
     270 * @param fildes File descriptor to be duplicated.
     271 * @return On success, new file descriptor for the same file, otherwise -1.
     272 */
    259273int posix_dup(int fildes)
    260274{
     
    262276}
    263277
     278/**
     279 * Duplicate an open file descriptor.
     280 *
     281 * @param fildes File descriptor to be duplicated.
     282 * @param fildes2 File descriptor to be paired with the same file description
     283 *     as is paired fildes.
     284 * @return fildes2 on success, -1 otherwise.
     285 */
    264286int posix_dup2(int fildes, int fildes2)
    265287{
  • uspace/lib/posix/unistd.h

    r11544f4 r2a53f71  
    7272/* File Manipulation */
    7373extern int posix_close(int fildes);
    74 
    7574extern ssize_t posix_read(int fildes, void *buf, size_t nbyte);
    7675extern ssize_t posix_write(int fildes, const void *buf, size_t nbyte);
    77 
    7876extern int posix_fsync(int fildes);
    7977extern int posix_ftruncate(int fildes, posix_off_t length);
    80 
    8178extern int posix_rmdir(const char *path);
    8279extern int posix_unlink(const char *path);
    83 
    8480extern int posix_dup(int fildes);
    8581extern int posix_dup2(int fildes, int fildes2);
Note: See TracChangeset for help on using the changeset viewer.