[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is deallocating MACH_PORT_NULL an error ?
From: |
Samuel Thibault |
Subject: |
Re: Is deallocating MACH_PORT_NULL an error ? |
Date: |
Thu, 22 Jan 2015 22:37:49 +0100 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Justus Winter, le Thu 22 Jan 2015 22:22:04 +0100, a écrit :
> So do we consider {deallocating,destroying,mod_refing} MACH_PORT_NULL
> or MACH_PORT_DEAD an error, or an expensive nop ?
AIUI frobbing PORT_DEAD is quite common indeed, like something died
while doing something, and we ended up with a dead name. Frobbing
PORT_NULL would be like free(NULL), it doesn't seem necessarily a
bad practice to be, it can simplify some code. At least those do not
do horrible things. I added the warnings about frobbing bogus ports
because that was actually doing horrible things when the bogus port
happened to be reused for something else.
Sammel