Skip to content

Commit

Permalink
Add TASK_EVENTS_INFO support to libps
Browse files Browse the repository at this point in the history
* libps/procstat.c (merge_procinfo): Also copy taskevents.
* libps/procstat.c (set_procinfo_flags): Set pointer to task_events_info.
* tasks: Remove TASK_EVENTS_INFO item.
  • Loading branch information
0xffea authored and sthibaul committed Jan 13, 2013
1 parent 2b2d7fd commit 55db6d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 6 additions & 0 deletions libps/procstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ merge_procinfo (struct proc_stat *ps, ps_flags_t need, ps_flags_t have)
/* Task info. */
bcopy (&old_pi_hdr.taskinfo, &new_pi->taskinfo,
sizeof (struct task_basic_info));
if (have & PSTAT_TASK_EVENTS)
/* Event info. */
bcopy (&old_pi_hdr.taskevents, &new_pi->taskevents,
sizeof (struct task_events_info));
/* That's it for now. */

if (new_pi != ps->proc_info)
Expand Down Expand Up @@ -637,6 +641,8 @@ set_procinfo_flags (struct proc_stat *ps, ps_flags_t need, ps_flags_t have)
gotten them, as the information will be newer. */
if (have & PSTAT_TASK_BASIC)
ps->task_basic_info = &pi->taskinfo;
if (have & PSTAT_TASK_EVENTS)
ps->task_events_info = &pi->taskevents;
if (have & PSTAT_NUM_THREADS)
ps->num_threads = count_threads (pi, have);
if (had & PSTAT_THREAD_BASIC)
Expand Down
2 changes: 0 additions & 2 deletions tasks
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ Please discuss proposed microkernel work with [email protected].
have said their could could be released to the public (but it has not
appeared).

* Implement TASK_EVENTS_INFO.

* Add an anonymous swap allocation statistic to the task info structure.


Expand Down

0 comments on commit 55db6d1

Please sign in to comment.