Mercurial > hg > xemacs-beta
comparison src/getloadavg.c @ 380:8626e4521993 r21-2-5
Import from CVS: tag r21-2-5
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:07:10 +0200 |
parents | 57709be46d1b |
children | 74fd4e045ea6 |
comparison
equal
deleted
inserted
replaced
379:76b7d63099ad | 380:8626e4521993 |
---|---|
56 UMAX4_3 | 56 UMAX4_3 |
57 WIN32 No-op for Windows95/NT. | 57 WIN32 No-op for Windows95/NT. |
58 __linux__ Linux: assumes /proc filesystem mounted. | 58 __linux__ Linux: assumes /proc filesystem mounted. |
59 Support from Michael K. Johnson. | 59 Support from Michael K. Johnson. |
60 __NetBSD__ NetBSD: assumes /kern filesystem mounted. | 60 __NetBSD__ NetBSD: assumes /kern filesystem mounted. |
61 __OpenBSD__ OpenBSD: dito. | 61 __OpenBSD__ OpenBSD: ditto. |
62 | 62 |
63 In addition, to avoid nesting many #ifdefs, we internally set | 63 In addition, to avoid nesting many #ifdefs, we internally set |
64 LDAV_DONE to indicate that the load average has been computed. | 64 LDAV_DONE to indicate that the load average has been computed. |
65 | 65 |
66 We also #define LDAV_PRIVILEGED if a program will require | 66 We also #define LDAV_PRIVILEGED if a program will require |
561 kstat_close (kc); | 561 kstat_close (kc); |
562 return -1; | 562 return -1; |
563 } | 563 } |
564 for (elem = 0; elem < nelem; elem++) | 564 for (elem = 0; elem < nelem; elem++) |
565 { | 565 { |
566 kstat_named_t *kn = kstat_data_lookup (ksp, avestrings[elem]); | 566 kstat_named_t *kn = |
567 (kstat_named_t *) kstat_data_lookup (ksp, avestrings[elem]); | |
567 if (!kn) | 568 if (!kn) |
568 { | 569 { |
569 kstat_close (kc); | 570 kstat_close (kc); |
570 return -1; | 571 return -1; |
571 } | 572 } |