You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Tree:
9a1400b30d
3096/hle/bufferc
3096/qcom/clamp
3096/spirv/warp
3096/vk/drain_pending_build
3096/vk/pipeline_compilation
Kernel
Update-some-barriers-test
android6
atomicops-mxwell
bcn-ternary-soft
chore/chore
civa
descriptor
descriptor_pool_opt
descriptor_set
disable-vap
discfix
display-modified-settings-first
dmnt2
dynarm7345
dynarmic-coproc
dynarmic-ppc64
eden-orbis-ps4
eds-true-adreno-fixes
eds-true-adreno-fixes-pre-0.1.0
ffmpeg-cross-compile
fix-fsr-crash-linux-waw
fix/discord-rpc
fix/gbh_test
flatopsfixes23485
freebsd-cubeb
fs_external_dlcupdates
install-vulkan-ps1-fix-windows-on-arm
interval-zero
lanobu
liz-crash-dumps-solaris
liz-dynarmic-backport-waitpkg
liz-dynarmic-macos-fbsd-port
liz-get-rid-of-mcl-intrusive-list
liz-heaptrack-fix
liz-no-rtti-allowance
lizzie/decoders-template-remove
lizzie/stack-fibers-vector
lm3-regression/1-of-3
lm3-regression/2-of-3
lm3-regression/shader-to-common
lock-term-1
macos-sqbuild
macroify-surface-stuffs
master
memsetopsyscallavoid
mmap-fixews
mutliplayer-filter-better1
n64
nce-strx
nce_cpp
netgate1
netusejthreadstuff
no-d24
pagetable-clustering
pintocputhing
pipelinederivative
qcom-weird-vk-ftz
quick-fix
refactoreds2
release/0.0.3
release/0.0.4
release/0.1.0
rem-dup-applet-launch
remove-unused-fastmem-fallback
reorder-menu-game-per-config
revert-1240cd43d70a502508115c9abb12f7ef27e1ca4e
revert-2695
revert-4758e126b863da560bf30a00deda3bb44e26b7fa
revert-7eb5710f353798b05b8860187e2728f7795717a0
revert-eed703bc81214a47a5fc7bd3abf22152cbd5c40b
scmfix-worktree
selfhost0
shaderwipe15
showcase
showcase2
simp-word-man1
sjkdbsdfjkbsdf-2834
smartqueryreset
spookymansionreducecpuusage
static-linux
stuffmadeforfun
sured-revert
techno48473719
test-revert-gpu-optim
test2
teto-territory
true-eds
true-eds-graphics
true-eds-pre-0.0.1
vk-fix-oom-force-maller-buffers
vk-surface-andpc
vulkan-thingy
woa-turnip-expr
worekrs467584
xbzk-mci-bare-minimum-boot-fix
xbzk-saf-recursive-write-with-permission-request
0.0.0
0.0.1-pre-alpha
0.0.2-pre-alpha
test-tag1
test-tag2
v0.0.3
v0.0.3-rc1
v0.0.3-rc2
v0.0.3-rc3
v0.0.3.git
v0.0.4
v0.0.4-rc1
v0.0.4-rc2
v0.0.4-rc2.test
v0.0.4-rc2.test2
v0.0.4-rc3
v0.0.4-rc3.test1
v0.0.4-rc3.test2
v0.0.4.test
v0.1.0-rc1
${ noResults }
eden/.appveyor
The kernel uses the handle table of the current process to retrieve the
process that should be used to retrieve certain information. To someone
not familiar with the kernel, this might raise the question of "Ok,
sounds nice, but doesn't this make it impossible to retrieve information
about the current process?".
No, it doesn't, because HandleTable instances in the kernel have the
notion of a "pseudo-handle", where certain values allow the kernel to
lookup objects outside of a given handle table. Currently, there's only
a pseudo-handle for the current process (0xFFFF8001) and a pseudo-handle
for the current thread (0xFFFF8000), so to retrieve the current process,
one would just pass 0xFFFF8001 into svcGetInfo.
The lookup itself in the handle table would be something like:
template <typename T>
T* Lookup(Handle handle) {
if (handle == PSEUDO_HANDLE_CURRENT_PROCESS) {
return CurrentProcess();
}
if (handle == PSUEDO_HANDLE_CURRENT_THREAD) {
return CurrentThread();
}
return static_cast<T*>(&objects[handle]);
}
which, as is shown, allows accessing the current process or current
thread, even if those two objects aren't actually within the HandleTable
instance.
|
7 years ago | |
|---|---|---|
| .. | ||
| UtilityFunctions.ps1 | Implement Citra pull 3043 | 8 years ago |