Kernel: pass Kernel ref in Event
This commit is contained in:
parent
734be98966
commit
eec11a94cb
33 changed files with 104 additions and 80 deletions
|
@ -350,7 +350,7 @@ bool DSP_DSP::HasTooManyEventsRegistered() const {
|
|||
return number >= max_number_of_interrupt_events;
|
||||
}
|
||||
|
||||
DSP_DSP::DSP_DSP() : ServiceFramework("dsp::DSP", DefaultMaxSessions) {
|
||||
DSP_DSP::DSP_DSP(Core::System& system) : ServiceFramework("dsp::DSP", DefaultMaxSessions) {
|
||||
static const FunctionInfo functions[] = {
|
||||
// clang-format off
|
||||
{0x00010040, &DSP_DSP::RecvData, "RecvData"},
|
||||
|
@ -391,7 +391,8 @@ DSP_DSP::DSP_DSP() : ServiceFramework("dsp::DSP", DefaultMaxSessions) {
|
|||
|
||||
RegisterHandlers(functions);
|
||||
|
||||
semaphore_event = Kernel::Event::Create(Kernel::ResetType::OneShot, "DSP_DSP::semaphore_event");
|
||||
semaphore_event =
|
||||
system.Kernel().CreateEvent(Kernel::ResetType::OneShot, "DSP_DSP::semaphore_event");
|
||||
}
|
||||
|
||||
DSP_DSP::~DSP_DSP() {
|
||||
|
@ -401,7 +402,7 @@ DSP_DSP::~DSP_DSP() {
|
|||
|
||||
void InstallInterfaces(Core::System& system) {
|
||||
auto& service_manager = system.ServiceManager();
|
||||
auto dsp = std::make_shared<DSP_DSP>();
|
||||
auto dsp = std::make_shared<DSP_DSP>(system);
|
||||
dsp->InstallAsService(service_manager);
|
||||
Core::DSP().SetServiceToInterrupt(std::move(dsp));
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace Service::DSP {
|
|||
|
||||
class DSP_DSP final : public ServiceFramework<DSP_DSP> {
|
||||
public:
|
||||
DSP_DSP();
|
||||
explicit DSP_DSP(Core::System& system);
|
||||
~DSP_DSP();
|
||||
|
||||
/// There are three types of interrupts
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue