Ignore:
Timestamp:
Sep 12, 2004, 9:40:29 PM (21 years ago)
Author:
bird
Message:

Adding BSD stuff like there was no tomorrow.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/include/InnoTekLIBC/backend.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r1504 r1505  
    2828#define __InnoTekLIBC_backend_h__
    2929
     30#include <sys/cdefs.h>
     31#include <sys/types.h>
     32
     33__BEGIN_DECLS
     34
    3035#ifndef __LIBC_THREAD_DECLARED
    3136#define __LIBC_THREAD_DECLARED
    3237typedef struct __libc_thread *__LIBC_PTHREAD, **__LIBC_PPTHREAD;
    3338#endif
     39struct statfs;
    3440
    3541
    36 /** @group __libc_Back_thread   LIBC Backend - Threads
     42/** @defgroup __libc_Back_thread   LIBC Backend - Threads
    3743 * @{ */
    3844
     
    7581/** @} */
    7682
    77 #if defined (__cplusplus)
    78 }
     83
     84/** @defgroup __libc_Back_fh   LIBC Backend - File Handles.
     85 * @{ */
     86
     87/**
     88 * Try resolve a filehandle to a path.
     89 *
     90 * @returns 0 on success.
     91 * @returns -1 and errno on failure.
     92 * @param   fh          The file handle.
     93 * @param   pszPath     Where to store the path.
     94 * @param   cchPath     The size of he buffer pointed to by pszPath.
     95 */
     96int __libc_Back_fhToPath(int fh, char *pszPath, size_t cchPath);
     97
     98/** @} */
     99
     100
     101/** @defgroup __libc_Back_fs   LIBC Backend - File System
     102 * @{ */
     103
     104/**
     105 * Get the statistics for the filesystem which pszPath is located on.
     106 *
     107 * @returns 0 on success.
     108 * @returns -1 and errno on failure.
     109 * @param   pszPath     The path to somewhere in the filesystem.
     110 * @param   pStatFs     Where to store the obtained information.
     111 */
     112int __libc_Back_fsStat(const char *pszPath, struct statfs *pStatFs);
     113
     114/**
     115 * Get file system statistics
     116 *
     117 * @returns 0 on success.
     118 * @returns -1 and errno on failure.
     119 * @param   fh          The filehandle of any file within the mounted file system.
     120 * @param   pStatFs     Where to store the statistics.
     121 */
     122int __libc_Back_fsStatFH(int fh, struct statfs *pStatFs);
     123
     124/**
     125 * Get the statistics for all the mounted filesystems.
     126 *
     127 * @returns Number of returned statfs structs on success.
     128 * @returns Number of mounted filesystems on success if paStatFS is NULL
     129 * @returns -1 and errno on failure.
     130 * @param   paStatFs    Where to to store the statistics.
     131 * @parma   cStatFS     Number of structures the array pointed to by paStatFs can hold.
     132 * @param   fFlags      Flags, currently ignored.
     133 */
     134int __libc_Back_fsStats(struct statfs *paStatFs, unsigned cStatFs, unsigned fFlags);
     135
     136/**
     137 * Schedules all file system buffers for writing.
     138 *
     139 * See sync() for OS/2 limitations.
     140 */
     141void __libc_Back_fsSync(void);
     142
     143/** @} */
     144
     145
     146
     147/** @defgroup __libc_Back_misc   LIBC Backend - Miscellaneous
     148 * @{ */
     149
     150/**
     151 * Gets the system load averages.
     152 * The load is the average values of ready and running threads(/processes)
     153 * over the last 1, 5 and 15 minuttes.
     154 *
     155 * @returns 0 on success.
     156 * @returns -1 and errno on failure.
     157 * @param   pardAvgs    Where to store the samples.
     158 * @param   cAvgs       Number of samples to get. Max is 3.
     159 * @remark  See OS/2 limitations in getloadavg().
     160 */
     161int __libc_Back_miscLoadAvg(double *pardAvgs, unsigned cAvgs);
     162
     163/** @} */
     164
     165__END_DECLS
     166
    79167#endif
    80 
    81 #endif /* not _EMX_SYSCALLS_H */
Note: See TracChangeset for help on using the changeset viewer.