Changeset 1505 for trunk/src/emx/include/InnoTekLIBC
- Timestamp:
- Sep 12, 2004, 9:40:29 PM (21 years ago)
- Location:
- trunk/src/emx/include/InnoTekLIBC
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/include/InnoTekLIBC/backend.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r1504 r1505 28 28 #define __InnoTekLIBC_backend_h__ 29 29 30 #include <sys/cdefs.h> 31 #include <sys/types.h> 32 33 __BEGIN_DECLS 34 30 35 #ifndef __LIBC_THREAD_DECLARED 31 36 #define __LIBC_THREAD_DECLARED 32 37 typedef struct __libc_thread *__LIBC_PTHREAD, **__LIBC_PPTHREAD; 33 38 #endif 39 struct statfs; 34 40 35 41 36 /** @ group __libc_Back_thread LIBC Backend - Threads42 /** @defgroup __libc_Back_thread LIBC Backend - Threads 37 43 * @{ */ 38 44 … … 75 81 /** @} */ 76 82 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 */ 96 int __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 */ 112 int __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 */ 122 int __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 */ 134 int __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 */ 141 void __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 */ 161 int __libc_Back_miscLoadAvg(double *pardAvgs, unsigned cAvgs); 162 163 /** @} */ 164 165 __END_DECLS 166 79 167 #endif 80 81 #endif /* not _EMX_SYSCALLS_H */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/InnoTekLIBC/sharedpm.h
-
Property cvs2svn:cvs-rev
changed from
1.5
to1.6
r1504 r1505 298 298 299 299 /** 300 * The structure contains the system load averages. 301 */ 302 typedef struct __libc_SPMLoadAvg 303 { 304 /** Array of the three stamples. 305 * The entries are for 1, 5 and 15 min averages respectively. 306 * 307 * The samples them selfs are stored as integers and not as a 308 * double as the interface returns. The reason is that this is smaller 309 * and it's what both BSD and Linux is doing. The fraction part is 310 * the lower 11 bits (this is also identical to BSD and Linux). 311 */ 312 uint32_t u32Samples[3]; 313 /** Timestamp of the last update. */ 314 unsigned uTimestamp; 315 } __LIBC_SPMLOADAVG; 316 /** Pointer to load averages. */ 317 typedef __LIBC_SPMLOADAVG *__LIBC_PSPMLOADAVG; 318 319 320 /** 300 321 * This is the header of the LIBC shared memory. 301 322 */ … … 336 357 char ach[16]; 337 358 }; 359 360 /** System Load Averages. */ 361 __LIBC_SPMLOADAVG LoadAvg; 362 338 363 /* The rest of the block, up to cbProcess, is undefined in this version. 339 364 * Future versions of LIBC may use this area assuming it's initalized with zeros. … … 531 556 532 557 /** 558 * Get the stored load average samples. 559 * 560 * @returns 0 on success. 561 * @returns -1 and errno on failure. 562 * @param pLoadAvg Where to store the load average samples. 563 * @param puTimestamp Where to store the current timestamp. 564 */ 565 int __libc_spmGetLoadAvg(__LIBC_PSPMLOADAVG pLoadAvg, unsigned *puTimestamp); 566 567 /** 568 * Get the stored load average samples. 569 * 570 * @returns 0 on success. 571 * @returns -1 and errno on failure. 572 * @param pLoadAvg Where to store the load average samples. 573 */ 574 int __libc_spmSetLoadAvg(const __LIBC_SPMLOADAVG *pLoadAvg); 575 576 /** 533 577 * Checks the SPM memory for trouble. 534 578 * -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.