Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Suyu
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
many-archive
Suyu
Commits
bc91ebac
There was an error fetching the commit references. Please try again later.
Commit
bc91ebac
authored
7 years ago
by
Subv
Browse files
Options
Downloads
Patches
Plain Diff
SVC: Implemented CancelSynchronization.
parent
a418f6e7
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/core/hle/kernel/errors.h
+2
-0
2 additions, 0 deletions
src/core/hle/kernel/errors.h
src/core/hle/kernel/svc.cpp
+17
-1
17 additions, 1 deletion
src/core/hle/kernel/svc.cpp
with
19 additions
and
1 deletion
src/core/hle/kernel/errors.h
+
2
−
0
View file @
bc91ebac
...
@@ -22,6 +22,8 @@ enum {
...
@@ -22,6 +22,8 @@ enum {
// Confirmed Switch OS error codes
// Confirmed Switch OS error codes
InvalidHandle
=
114
,
InvalidHandle
=
114
,
Timeout
=
117
,
Timeout
=
117
,
SynchronizationCanceled
=
118
,
TooLarge
=
119
,
};
};
}
}
...
...
This diff is collapsed.
Click to expand it.
src/core/hle/kernel/svc.cpp
+
17
−
1
View file @
bc91ebac
...
@@ -216,6 +216,22 @@ static ResultCode WaitSynchronization(Handle* index, VAddr handles_address, u64
...
@@ -216,6 +216,22 @@ static ResultCode WaitSynchronization(Handle* index, VAddr handles_address, u64
return
WaitSynchronization1
(
objects
[
0
],
GetCurrentThread
(),
nano_seconds
);
return
WaitSynchronization1
(
objects
[
0
],
GetCurrentThread
(),
nano_seconds
);
}
}
/// Resumes a thread waiting on WaitSynchronization
static
ResultCode
CancelSynchronization
(
Handle
thread_handle
)
{
LOG_TRACE
(
Kernel_SVC
,
"called thread=0x%08X"
,
thread_handle
);
const
SharedPtr
<
Thread
>
thread
=
g_handle_table
.
Get
<
Thread
>
(
thread_handle
);
if
(
!
thread
)
{
return
ERR_INVALID_HANDLE
;
}
ASSERT
(
thread
->
status
==
THREADSTATUS_WAIT_SYNCH_ANY
);
thread
->
SetWaitSynchronizationResult
(
ResultCode
(
ErrorModule
::
Kernel
,
ErrCodes
::
SynchronizationCanceled
));
thread
->
ResumeFromWait
();
return
RESULT_SUCCESS
;
}
/// Attempts to locks a mutex, creating it if it does not already exist
/// Attempts to locks a mutex, creating it if it does not already exist
static
ResultCode
LockMutex
(
Handle
holding_thread_handle
,
VAddr
mutex_addr
,
static
ResultCode
LockMutex
(
Handle
holding_thread_handle
,
VAddr
mutex_addr
,
Handle
requesting_thread_handle
)
{
Handle
requesting_thread_handle
)
{
...
@@ -646,7 +662,7 @@ static const FunctionDef SVC_Table[] = {
...
@@ -646,7 +662,7 @@ static const FunctionDef SVC_Table[] = {
{
0x16
,
SvcWrap
<
CloseHandle
>
,
"CloseHandle"
},
{
0x16
,
SvcWrap
<
CloseHandle
>
,
"CloseHandle"
},
{
0x17
,
nullptr
,
"ResetSignal"
},
{
0x17
,
nullptr
,
"ResetSignal"
},
{
0x18
,
SvcWrap
<
WaitSynchronization
>
,
"WaitSynchronization"
},
{
0x18
,
SvcWrap
<
WaitSynchronization
>
,
"WaitSynchronization"
},
{
0x19
,
nullptr
,
"CancelSynchronization"
},
{
0x19
,
SvcWrap
<
CancelSynchronization
>
,
"CancelSynchronization"
},
{
0x1A
,
SvcWrap
<
LockMutex
>
,
"LockMutex"
},
{
0x1A
,
SvcWrap
<
LockMutex
>
,
"LockMutex"
},
{
0x1B
,
SvcWrap
<
UnlockMutex
>
,
"UnlockMutex"
},
{
0x1B
,
SvcWrap
<
UnlockMutex
>
,
"UnlockMutex"
},
{
0x1C
,
SvcWrap
<
WaitProcessWideKeyAtomic
>
,
"WaitProcessWideKeyAtomic"
},
{
0x1C
,
SvcWrap
<
WaitProcessWideKeyAtomic
>
,
"WaitProcessWideKeyAtomic"
},
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment