By entering this site you need to consent to the use of cookies and their functional use according to this privacy policy. Cookies help us to provide the functional services of the website. Kindly read the below message of use and consent to the use.
The following cookies are stored and shared when accessing this website:
- Internal cookies for the MediaWiki site. This is used for user authentication and article modifications.
- Third-party cookies from Google providing services for Google AdSense and Google Analytics
We will never use data collected outside of the above scope.
| Thread type - kernel threads are 0-2 and are assigned values based on where in the kernel the thread is created. All threads created outside the kernel environment are type 3.
+
| Thread affinity mask - set differently depending on whether the thread is created via svc call or from inside the kernel
|-
|-
| 0x80
| 0x80
Line 142:
Line 142:
| Pointer to linked list that has stolen it, or 0 if in normal list
| Pointer to linked list that has stolen it, or 0 if in normal list
|}
|}
+
+
+
=Thread Affinity Mask=
+
+
If the thread is created via a call to SVC 8(CreateThread), which uses thread creation type 3, and the CPU ID is -2(meaning use the core specified in the exheader), the mask is just the affinity mask from the thread's owner KProcess. If the CPU ID is -1(meaning any core), the affinity mask is set to 0xF on the New3DS and 0x3 on the Old3DS. Otherwise, the affinity mask is (1 << cpu_id) | 1.
+
+
If the thread is created via a call by the kernel, which uses thread creation types 0-2, the checks for -1 and -2 are skipped and the mask is always (1 << cpu_id) | 1.