Mercurial > emacs
comparison src/getloadavg.c @ 4349:dd0ad363f07a
*** empty log message ***
author | Roland McGrath <roland@gnu.org> |
---|---|
date | Fri, 30 Jul 1993 03:20:49 +0000 |
parents | 294aa73cf31c |
children | 67c9f8ba927a |
comparison
equal
deleted
inserted
replaced
4348:1c2066be8443 | 4349:dd0ad363f07a |
---|---|
29 otherwise, no load average is available. | 29 otherwise, no load average is available. |
30 NLIST_STRUCT Include nlist.h, not a.out.h, and | 30 NLIST_STRUCT Include nlist.h, not a.out.h, and |
31 the nlist n_name element is a pointer, | 31 the nlist n_name element is a pointer, |
32 not an array. | 32 not an array. |
33 NLIST_NAME_UNION struct nlist has an n_un member, not n_name. | 33 NLIST_NAME_UNION struct nlist has an n_un member, not n_name. |
34 LINUX_LDAV_FILE [LINUX]: Name of file containing load averages. | 34 LINUX_LDAV_FILE [__linux__]: File containing load averages. |
35 | 35 |
36 Specific system predefines this file uses, aside from setting | 36 Specific system predefines this file uses, aside from setting |
37 default values if not emacs: | 37 default values if not emacs: |
38 | 38 |
39 apollo | 39 apollo |
47 _SEQUENT_ Sequent DYNIX/ptx 1.x.x (SYSV) | 47 _SEQUENT_ Sequent DYNIX/ptx 1.x.x (SYSV) |
48 sony_news NEWS-OS (works at least for 4.1C) | 48 sony_news NEWS-OS (works at least for 4.1C) |
49 UMAX | 49 UMAX |
50 UMAX4_3 | 50 UMAX4_3 |
51 VMS | 51 VMS |
52 LINUX Linux: assumes /proc filesystem mounted. | 52 __linux__ Linux: assumes /proc filesystem mounted. |
53 Support from Michael K. Johnson. | 53 Support from Michael K. Johnson. |
54 | 54 |
55 In addition, to avoid nesting many #ifdefs, we internally set | 55 In addition, to avoid nesting many #ifdefs, we internally set |
56 LDAV_DONE to indicate that the load average has been computed. | 56 LDAV_DONE to indicate that the load average has been computed. |
57 | 57 |
455 this function just can't work at all on this system. */ | 455 this function just can't work at all on this system. */ |
456 errno = 0; | 456 errno = 0; |
457 elem = -1; | 457 elem = -1; |
458 #endif | 458 #endif |
459 | 459 |
460 #if !defined (LDAV_DONE) && defined (LINUX) | 460 #if !defined (LDAV_DONE) && defined (__linux__) |
461 #define LDAV_DONE | 461 #define LDAV_DONE |
462 #undef LOAD_AVE_TYPE | 462 #undef LOAD_AVE_TYPE |
463 | 463 |
464 #ifndef LINUX_LDAV_FILE | 464 #ifndef LINUX_LDAV_FILE |
465 #define LINUX_LDAV_FILE "/proc/loadavg" | 465 #define LINUX_LDAV_FILE "/proc/loadavg" |
485 for (elem = 0; elem < nelem && elem < count; elem++) | 485 for (elem = 0; elem < nelem && elem < count; elem++) |
486 loadavg[elem] = load_ave[elem]; | 486 loadavg[elem] = load_ave[elem]; |
487 | 487 |
488 return elem; | 488 return elem; |
489 | 489 |
490 #endif /* LINUX */ | 490 #endif /* __linux__ */ |
491 | 491 |
492 #if !defined (LDAV_DONE) && defined (NeXT) | 492 #if !defined (LDAV_DONE) && defined (NeXT) |
493 #define LDAV_DONE | 493 #define LDAV_DONE |
494 /* The NeXT code was adapted from iscreen 3.2. */ | 494 /* The NeXT code was adapted from iscreen 3.2. */ |
495 | 495 |