current_task(), struct proc...
site_archiver@lists.apple.com Delivered-To: Darwin-kernel@lists.apple.com Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=TYdJnueebuoHkVTu+liqb6PNKcvfghBI9LN6mGjMSo6sLwn9u9VeLE9qPwqgemKzYmliZ35Htkbv7fdqChQq6/gLPTJ5FYNQsB6jnwKST+cxT5cgn2eyPxVMVcZldKPRb5pksBT3c0WOH8PjNDwILEhTtnpO1XHX4IV9K1/JnNs= This is more of a sanity check (I've done the code check on this under Panther and a quick look at the Darwin source). I have a character device (struct cdevsw) that is being installed via cdevsw_add() (etc.). The ioctl works fine, no problems here. Under some circumstances, memory mapping is performed (say user to kernel). Under Panther the task_t id is gotten directly from the struct proc parameter. Under Tiger, I'm not seeing an API to extract the task id from the proc struct so I thought that current_task() would be a safe bet. Under Panther, I can see that in this scenario, current_task() == p->task. I can't see why that wouldn't always be true (in this scenario, I need to do more code reading for a better blanket statement and it's not really important at the moment). Is it safe to just port my ioctl callback routine to use current_task() for both Tiger and Panther? Thanks! Cheers, H. _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Herb Petschauer