kernel/UserEvent: Make sure UserEvent object is valid during DPC
Most of the actual UserEvent work is done in DPC so that we don't have to care about the limitations of the context in which UserEvent::Fire() is invoked. This requires appropriate management of lifetime of UserEvent instances to make sure that DoDPC() method is always called on a valid object.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014, Paweł Dziepak, [email protected].
|
||||
* Copyright 2011, Ingo Weinhold, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
@@ -21,7 +22,7 @@ struct Team;
|
||||
struct Thread;
|
||||
|
||||
|
||||
struct UserEvent {
|
||||
struct UserEvent : public BReferenceable {
|
||||
virtual ~UserEvent();
|
||||
|
||||
virtual status_t Fire() = 0;
|
||||
|
||||
Reference in New Issue
Block a user