OpenVZ Forum


Home » Mailing lists » Devel » [PATCH 0/3] Make tasks always have non-zero pids
Re: [PATCH 2/3] Prepare pid_nr() etc functions to work with not-NULL pids [message #21274 is a reply to message #21238] Thu, 04 October 2007 08:54 Go to previous messageGo to previous message
Pavel Emelianov is currently offline  Pavel Emelianov
Messages: 1149
Registered: September 2006
Senior Member
Matt Mackall wrote:
> On Wed, Oct 03, 2007 at 06:20:43PM +0400, Pavel Emelyanov wrote:
>> Just make the __pid_nr() etc functions that expect the argument
>> to always be not NULL.
>>
>> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
> 
>>  static inline pid_t pid_nr(struct pid *pid)
>>  {
>>  	pid_t nr = 0;
>>  	if (pid)
>> -		nr = pid->numbers[0].nr;
>> +		nr = __pid_nr(pid);
>>  	return nr;
>>  }
> 
> Is there a patch that removes these inlines? Otherwise this looks good
> to me.

Not yet. Some of are uninlined already, but others are not. I'd like 
to make some testing before uninline them.

> --
> Mathematics is the supreme nostalgia of our time.
>
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: post1
Next Topic: [PATCH 0/5] Kernel memory accounting container (v5)
Goto Forum:
  


Current Time: Mon Sep 01 02:22:54 GMT 2025

Total time taken to generate the page: 0.05546 seconds