mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-03 10:53:23 +00:00
Port Proced to Android
* configure.ac (HAVE_PROCFS): Define if opsys is `android'. * src/android.c (android_set_task_name): New function. (android_run_select_thread, android_run_debug_thread): Set the name of the LWP for debugging purposes. * src/process.c (create_process): Set F_SETPIPE_SZ on Android in addition to GNU/Linux. * src/sysdep.c (procfs_ttyname, system_process_attributes) [__ANDROID__]: Enable procfs_ttyname on Android systems.
This commit is contained in:
parent
2416168310
commit
8b25edfbda
4 changed files with 55 additions and 8 deletions
10
src/sysdep.c
10
src/sysdep.c
|
@ -3452,7 +3452,7 @@ make_lisp_timeval (struct timeval t)
|
|||
|
||||
#endif
|
||||
|
||||
#if defined (GNU_LINUX) || defined (CYGWIN)
|
||||
#if defined (GNU_LINUX) || defined (CYGWIN) || defined __ANDROID__
|
||||
|
||||
static Lisp_Object
|
||||
time_from_jiffies (unsigned long long ticks, Lisp_Object hz, Lisp_Object form)
|
||||
|
@ -3500,7 +3500,7 @@ get_up_time (void)
|
|||
return up;
|
||||
}
|
||||
|
||||
# ifdef GNU_LINUX
|
||||
# if defined GNU_LINUX || defined __ANDROID__
|
||||
#define MAJOR(d) (((unsigned)(d) >> 8) & 0xfff)
|
||||
#define MINOR(d) (((unsigned)(d) & 0xff) | (((unsigned)(d) & 0xfff00000) >> 12))
|
||||
|
||||
|
@ -3546,7 +3546,7 @@ procfs_ttyname (int rdev)
|
|||
unblock_input ();
|
||||
return build_string (name);
|
||||
}
|
||||
# endif /* GNU_LINUX */
|
||||
# endif /* GNU_LINUX || __ANDROID__ */
|
||||
|
||||
static uintmax_t
|
||||
procfs_get_total_memory (void)
|
||||
|
@ -3695,9 +3695,9 @@ system_process_attributes (Lisp_Object pid)
|
|||
attrs = Fcons (Fcons (Qppid, INT_TO_INTEGER (ppid)), attrs);
|
||||
attrs = Fcons (Fcons (Qpgrp, INT_TO_INTEGER (pgrp)), attrs);
|
||||
attrs = Fcons (Fcons (Qsess, INT_TO_INTEGER (sess)), attrs);
|
||||
# ifdef GNU_LINUX
|
||||
# if defined GNU_LINUX || defined __ANDROID__
|
||||
attrs = Fcons (Fcons (Qttname, procfs_ttyname (tty)), attrs);
|
||||
# endif
|
||||
# endif /* GNU_LINUX || __ANDROID__ */
|
||||
attrs = Fcons (Fcons (Qtpgid, INT_TO_INTEGER (tpgid)), attrs);
|
||||
attrs = Fcons (Fcons (Qminflt, INT_TO_INTEGER (minflt)), attrs);
|
||||
attrs = Fcons (Fcons (Qmajflt, INT_TO_INTEGER (majflt)), attrs);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue