diff options
author | Benoît Dejean <bdejean@src.gnome.org> | 2007-09-21 22:26:18 +0000 |
---|---|---|
committer | Benoît Dejean <bdejean@src.gnome.org> | 2007-09-21 22:26:18 +0000 |
commit | 771f0848b352f0586ee687077f2548e379745b02 (patch) | |
tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /examples/proclist.c | |
parent | fcee021a2d23a8c1d84e1c6411f2d2561514a5aa (diff) | |
download | libgtop-affinity.tar.gz |
Killed branch. SVN SUCKS.affinity
Killed branch.
SVN SUCKS.
svn path=/branches/affinity; revision=2662
Diffstat (limited to 'examples/proclist.c')
-rw-r--r-- | examples/proclist.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/examples/proclist.c b/examples/proclist.c deleted file mode 100644 index 542e8e98..00000000 --- a/examples/proclist.c +++ /dev/null @@ -1,43 +0,0 @@ -#include <glibtop.h> -#include <glibtop/proclist.h> - -#include <glib.h> - -#include <stdio.h> - -#include <unistd.h> -#include <sys/types.h> - - -static void print_pids(guint64 which, guint64 arg) -{ - unsigned *pids; - unsigned i; - glibtop_proclist buf; - - pids = glibtop_get_proclist(&buf, which, arg); - - printf("glibtop_get_proclist(%#llx, %llu) -> %lu processes\n", - which, arg, (unsigned long)buf.number); - - for (i = 0; i < buf.number; ++i) - printf("%u ", pids[i]); - - putchar('\n'); - putchar('\n'); - - g_free(pids); -} - - -int main() -{ - glibtop_init(); - - print_pids(GLIBTOP_KERN_PROC_ALL, 0); - print_pids(GLIBTOP_KERN_PROC_UID, getuid()); - - glibtop_close(); - - return 0; -} |