Commit 06e111a6 authored by Dan Nicolaescu's avatar Dan Nicolaescu

Reorganize implementation of Flist_system_processes and

Fsystem_process_attributes.  No functional changes.
* process.c: Don't #include pwd.h, grp.h and limits.h.
(Flist_system_processes): Just call list_system_processes.
(Fsystem_process_attributes): Just call system_process_attributes.
(procfs_list_system_processes, time_from_jiffies)
(ltime_from_jiffies, get_up_time, procfs_ttyname, MAJOR, MINOR)
(procfs_get_total_memory, procfs_system_process_attributes): Move ...

* sysdep.c: ... here.  Include pwd.h, grp.h and limits.h.
(list_system_processes): Rename from
procfs_list_system_processes.  Enclose in #ifdef HAVE_PROCFS.
Provide a do nothing implementation.
(system_process_attributes): Rename from
procfs_list_system_processes.
(ltime_from_jiffies, get_up_time, procfs_ttyname, MAJOR, MINOR)
(procfs_get_total_memory):  Enclose in #ifdef GNU_LINUX.

* w32.c (list_system_processes): Rename from
w32_list_system_processes.
(system_process_attributes): Rename from
w32_system_process_attributes.

* s/gnu-linux.h (LISTPROC, PROCATTR): Remove.

* process.h (w32_list_system_processes)
(w32_system_process_attributes): Remove.
(list_system_processes, system_process_attributes): New
prototypes.

* config.nt (LISTPROC, PROCATTR): Remove.
parent 349b3256
......@@ -40,8 +40,6 @@ FRAME_WINDOW_P A GUI frame (like X, w32, etc.)
** Support for accessing other processes on the system **
HAVE_PROCFS The /proc filesystem is supported.
LISTPROC A function that returns a list of PIDs of system processes.
PROCATTR A function that returns attributes of a process.
** Compile-time options **
......
2008-12-19 Dan Nicolaescu <dann@ics.uci.edu>
* config.nt (LISTPROC, PROCATTR): Remove.
2008-08-09 Eli Zaretskii <eliz@gnu.org>
* config.nt (LISTPROC, PROCATTR): New macros.
......
......@@ -464,10 +464,6 @@ void w32_abort (void) NO_RETURN;
#endif
#endif
/* Support for listing processes and their attributes. */
#define LISTPROC w32_list_system_processes
#define PROCATTR w32_system_process_attributes
/* Prevent accidental use of features unavailable in
older Windows versions we still support. */
#define _WIN32_WINNT 0x0400
......
2008-12-19 Dan Nicolaescu <dann@ics.uci.edu>
Reorganize implementation of Flist_system_processes and
Fsystem_process_attributes. No functional changes.
* process.c: Don't #include pwd.h, grp.h and limits.h.
(Flist_system_processes): Just call list_system_processes.
(Fsystem_process_attributes): Just call system_process_attributes.
(procfs_list_system_processes, time_from_jiffies)
(ltime_from_jiffies, get_up_time, procfs_ttyname, MAJOR, MINOR)
(procfs_get_total_memory, procfs_system_process_attributes): Move ...
* sysdep.c: ... here. Include pwd.h, grp.h and limits.h.
(list_system_processes): Rename from
procfs_list_system_processes. Enclose in #ifdef HAVE_PROCFS.
Provide a do nothing implementation.
(system_process_attributes): Rename from
procfs_list_system_processes.
(ltime_from_jiffies, get_up_time, procfs_ttyname, MAJOR, MINOR)
(procfs_get_total_memory): Enclose in #ifdef GNU_LINUX.
* w32.c (list_system_processes): Rename from
w32_list_system_processes.
(system_process_attributes): Rename from
w32_system_process_attributes.
* s/gnu-linux.h (LISTPROC, PROCATTR): Remove.
* process.h (w32_list_system_processes)
(w32_system_process_attributes): Remove.
(list_system_processes, system_process_attributes): New
prototypes.
2008-12-19 Kenichi Handa <handa@m17n.org>
* xfont.c (xfont_decode_coding_xlfd): New function.
......
This diff is collapsed.
......@@ -161,13 +161,13 @@ extern int synch_process_retcode;
when exiting. */
extern int inhibit_sentinels;
extern Lisp_Object w32_list_system_processes P_ ((void));
extern Lisp_Object w32_system_process_attributes P_ ((Lisp_Object));
extern Lisp_Object Qeuid, Qegid, Qcomm, Qstate, Qppid, Qpgrp, Qsess, Qttname;
extern Lisp_Object Qminflt, Qmajflt, Qcminflt, Qcmajflt, Qutime, Qstime;
extern Lisp_Object Qcutime, Qpri, Qnice, Qthcount, Qstart, Qvsize, Qrss, Qargs;
extern Lisp_Object Quser, Qgroup, Qetime, Qpcpu, Qpmem, Qtpgid, Qcstime;
extern Lisp_Object list_system_processes (void);
extern Lisp_Object system_process_attributes (Lisp_Object);
/* arch-tag: dffedfc4-d7bc-4b58-a26f-c16155449c72
(do not change this comment) */
......@@ -105,10 +105,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define BSTRING
/* These are used in Flist_system_processes and Fsystem_process_attributes. */
/* This is used in list_system_processes. */
#define HAVE_PROCFS 1
#define LISTPROC procfs_list_system_processes
#define PROCATTR procfs_system_process_attributes
/* define MAIL_USE_FLOCK if the mailer uses flock
to interlock access to /usr/spool/mail/$USER.
......
This diff is collapsed.
......@@ -3671,7 +3671,7 @@ BOOL WINAPI global_memory_status_ex (
}
Lisp_Object
w32_list_system_processes ()
list_system_processes ()
{
struct gcpro gcpro1;
Lisp_Object proclist = Qnil;
......@@ -3823,7 +3823,7 @@ process_times (h_proc, ctime, etime, stime, utime, pcpu)
}
Lisp_Object
w32_system_process_attributes (pid)
system_process_attributes (pid)
Lisp_Object pid;
{
struct gcpro gcpro1, gcpro2, gcpro3;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment