#include <linux/mount.h>
#include <linux/proc_fs.h>
#include <linux/mempolicy.h>
+#include <linux/vs_limit.h>
+
#include <linux/ckrm.h>
#include <linux/ckrm_tsk.h>
/* tasklist_lock is held, is this sufficient? */
if (p->vx_info) {
atomic_dec(&p->vx_info->cacct.nr_threads);
- atomic_dec(&p->vx_info->limit.res[RLIMIT_NPROC]);
+ vx_nproc_dec(p->vx_info);
+ // atomic_dec(&p->vx_info->limit.res[RLIMIT_NPROC]);
}
detach_pid(p, PIDTYPE_PID);
detach_pid(p, PIDTYPE_TGID);
* Clear these here so that update_process_times() won't try to deliver
* itimer, profile or rlimit signals to this task while it is in late exit.
*/
- tsk->it_virt_incr = 0;
+ tsk->it_virt_value = 0;
tsk->it_prof_value = 0;
tsk->rlim[RLIMIT_CPU].rlim_cur = RLIM_INFINITY;
do_exit((error_code&0xff)<<8);
}
-task_t fastcall *next_thread(task_t *p)
+task_t fastcall *next_thread(const task_t *p)
{
- struct pid_link *link = p->pids + PIDTYPE_TGID;
- struct list_head *tmp, *head = &link->pidptr->task_list;
+ const struct pid_link *link = p->pids + PIDTYPE_TGID;
+ const struct list_head *tmp, *head = &link->pidptr->task_list;
#ifdef CONFIG_SMP
if (!p->sighand)