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
1b247b80
There was an error fetching the commit references. Please try again later.
Commit
1b247b80
authored
10 years ago
by
bunnei
Browse files
Options
Downloads
Patches
Plain Diff
SRV: Updated GetProcSemaphore to create an event instead of a mutex.
parent
4d460704
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/core/hle/service/srv.cpp
+10
-8
10 additions, 8 deletions
src/core/hle/service/srv.cpp
with
10 additions
and
8 deletions
src/core/hle/service/srv.cpp
+
10
−
8
View file @
1b247b80
...
@@ -5,28 +5,30 @@
...
@@ -5,28 +5,30 @@
#include
"core/hle/hle.h"
#include
"core/hle/hle.h"
#include
"core/hle/service/srv.h"
#include
"core/hle/service/srv.h"
#include
"core/hle/service/service.h"
#include
"core/hle/service/service.h"
#include
"core/hle/kernel/
mutex
.h"
#include
"core/hle/kernel/
event
.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
// Namespace SRV
// Namespace SRV
namespace
SRV
{
namespace
SRV
{
Handle
g_
mutex
=
0
;
Handle
g_
event_handle
=
0
;
void
Initialize
(
Service
::
Interface
*
self
)
{
void
Initialize
(
Service
::
Interface
*
self
)
{
DEBUG_LOG
(
OSHLE
,
"called"
);
DEBUG_LOG
(
OSHLE
,
"called"
);
if
(
!
g_mutex
)
{
g_mutex
=
Kernel
::
CreateMutex
(
true
,
"SRV:Lock"
);
}
}
}
void
GetProcSemaphore
(
Service
::
Interface
*
self
)
{
void
GetProcSemaphore
(
Service
::
Interface
*
self
)
{
DEBUG_LOG
(
OSHLE
,
"called"
);
DEBUG_LOG
(
OSHLE
,
"called"
);
// Get process semaphore?
u32
*
cmd_buff
=
Service
::
GetCommandBuffer
();
u32
*
cmd_buff
=
Service
::
GetCommandBuffer
();
cmd_buff
[
1
]
=
0
;
// No error
cmd_buff
[
3
]
=
g_mutex
;
// Return something... 0 == nullptr, raises an exception
// TODO(bunnei): Change to a semaphore once these have been implemented
g_event_handle
=
Kernel
::
CreateEvent
(
RESETTYPE_ONESHOT
,
"SRV:Event"
);
Kernel
::
SetEventLocked
(
g_event_handle
,
false
);
cmd_buff
[
1
]
=
0
;
// No error
cmd_buff
[
3
]
=
g_event_handle
;
}
}
void
GetServiceHandle
(
Service
::
Interface
*
self
)
{
void
GetServiceHandle
(
Service
::
Interface
*
self
)
{
...
...
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