Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 May 2019 17:53:36 +0000 (UTC)
From:      Johannes Lundberg <johalun@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r347843 - in head/sys/compat/linuxkpi/common: include/linux src
Message-ID:  <201905161753.x4GHraQi022199@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: johalun
Date: Thu May 16 17:53:36 2019
New Revision: 347843
URL: https://svnweb.freebsd.org/changeset/base/347843

Log:
  LinuxKPI: Add group_leader member to struct task_struct.
  
  Assign self as group leader at creation to act as the only member of a
  new process group.
  This patch is part of D19565
  
  Reviewed by:	hps
  Approved by:	imp (mentor), hps
  MFC after:	1 week

Modified:
  head/sys/compat/linuxkpi/common/include/linux/sched.h
  head/sys/compat/linuxkpi/common/src/linux_current.c

Modified: head/sys/compat/linuxkpi/common/include/linux/sched.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/sched.h	Thu May 16 17:51:30 2019	(r347842)
+++ head/sys/compat/linuxkpi/common/include/linux/sched.h	Thu May 16 17:53:36 2019	(r347843)
@@ -80,6 +80,7 @@ struct task_struct {
 	int rcu_recurse;
 	int bsd_interrupt_value;
 	struct work_struct *work;	/* current work struct, if set */
+	struct task_struct *group_leader;
 };
 
 #define	current	({ \

Modified: head/sys/compat/linuxkpi/common/src/linux_current.c
==============================================================================
--- head/sys/compat/linuxkpi/common/src/linux_current.c	Thu May 16 17:51:30 2019	(r347842)
+++ head/sys/compat/linuxkpi/common/src/linux_current.c	Thu May 16 17:53:36 2019	(r347843)
@@ -67,6 +67,7 @@ linux_alloc_current(struct thread *td, int flags)
 	ts->task_thread = td;
 	ts->comm = td->td_name;
 	ts->pid = td->td_tid;
+	ts->group_leader = ts;
 	atomic_set(&ts->usage, 1);
 	atomic_set(&ts->state, TASK_RUNNING);
 	init_completion(&ts->parked);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905161753.x4GHraQi022199>