Re: [PATCH v8 1/8] rust: types: add `NotThreadSafe`

From: Peter Zijlstra
Date: Thu Jul 25 2024 - 11:30:42 EST


On Thu, Jul 25, 2024 at 05:09:14PM +0200, Alice Ryhl wrote:

> > As per always for not being able to read rust; how does this extend to
> > get_task_struct()? Once you've taken a reference on current, you should
> > be free to pass it along to whomever.
>
> Once you take a reference on current, it becomes thread-safe. This is
> because taking a reference creates a value of type ARef<Task> rather
> than TaskRef, and ARef<Task> is considered thread-safe.

Ignoring comments, there isn't a single mention of ARef there. Where
does it come from?