proclist: WCHAN for Open/FreeBSD.
Don't know of any distribution actually exposing /proc/<pid>/wchan reliably.
This commit is contained in:
parent
f060c437a8
commit
8c2d845605
|
@ -656,6 +656,9 @@ _ui_init_system_probe(Evisum_Ui *ui)
|
||||||
#if defined(__FreeBSD__)
|
#if defined(__FreeBSD__)
|
||||||
ui->mem.zfs_mounted = file_system_in_use("ZFS");
|
ui->mem.zfs_mounted = file_system_in_use("ZFS");
|
||||||
#endif
|
#endif
|
||||||
|
#if !defined(__linux__)
|
||||||
|
ui->proc.has_wchan = 1;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -32,6 +32,7 @@ typedef struct _Evisum_Ui
|
||||||
Eina_Bool restart;
|
Eina_Bool restart;
|
||||||
|
|
||||||
Eina_Bool has_kthreads;
|
Eina_Bool has_kthreads;
|
||||||
|
Eina_Bool has_wchan;
|
||||||
|
|
||||||
int poll_delay;
|
int poll_delay;
|
||||||
int sort_type;
|
int sort_type;
|
||||||
|
|
|
@ -719,9 +719,14 @@ _content_get(void *data, Evas_Object *obj, const char *source)
|
||||||
|
|
||||||
if (_field_enabled(PROC_FIELD_STATE))
|
if (_field_enabled(PROC_FIELD_STATE))
|
||||||
{
|
{
|
||||||
|
Evisum_Ui *ui = pd->ui;
|
||||||
|
|
||||||
evas_object_geometry_get(pd->btn_state, NULL, NULL, &w, NULL);
|
evas_object_geometry_get(pd->btn_state, NULL, NULL, &w, NULL);
|
||||||
lb = evas_object_data_get(it->obj, "state");
|
lb = evas_object_data_get(it->obj, "state");
|
||||||
snprintf(buf, sizeof(buf), "%s", proc->state);
|
if ((ui->proc.has_wchan) && (proc->state[0] == 's' && proc->state[1] == 'l'))
|
||||||
|
snprintf(buf, sizeof(buf), "%s", proc->wchan);
|
||||||
|
else
|
||||||
|
snprintf(buf, sizeof(buf), "%s", proc->state);
|
||||||
if (strcmp(buf, elm_object_text_get(lb)))
|
if (strcmp(buf, elm_object_text_get(lb)))
|
||||||
elm_object_text_set(lb, buf);
|
elm_object_text_set(lb, buf);
|
||||||
_field_adjust(pd, PROC_FIELD_STATE, lb, w);
|
_field_adjust(pd, PROC_FIELD_STATE, lb, w);
|
||||||
|
|
Loading…
Reference in New Issue