Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Mar 2017 12:33:34 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r315410 - head/sys/compat/linuxkpi/common/include/linux
Message-ID:  <201703161233.v2GCXYPo032514@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Thu Mar 16 12:33:34 2017
New Revision: 315410
URL: https://svnweb.freebsd.org/changeset/base/315410

Log:
  Define some more LinuxKPI task related macros.
  
  Obtained from:		kmacy @
  MFC after:		1 week
  Sponsored by:		Mellanox Technologies

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

Modified: head/sys/compat/linuxkpi/common/include/linux/sched.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/sched.h	Thu Mar 16 12:16:23 2017	(r315409)
+++ head/sys/compat/linuxkpi/common/include/linux/sched.h	Thu Mar 16 12:33:34 2017	(r315410)
@@ -69,6 +69,12 @@ struct task_struct {
 
 #define	current		((struct task_struct *)curthread->td_lkpi_task)
 
+#define	task_pid(task)		((task)->task_thread->td_proc->p_pid)
+#define	task_pid_nr(task)	((task)->task_thread->td_tid)
+#define	get_pid(x) (x)
+#define	put_pid(x)
+#define	current_euid()	(curthread->td_ucred->cr_uid)
+
 #define	set_current_state(x)						\
 	atomic_store_rel_int((volatile int *)&current->state, (x))
 #define	__set_current_state(x)	current->state = (x)



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