The Pedigree Project
0.1
src
system
include
pedigree
kernel
utilities
ZombieQueue.h
1
/*
2
* Copyright (c) 2008-2014, Pedigree Developers
3
*
4
* Please see the CONTRIB file in the root of the source tree for a full
5
* list of contributors.
6
*
7
* Permission to use, copy, modify, and distribute this software for any
8
* purpose with or without fee is hereby granted, provided that the above
9
* copyright notice and this permission notice appear in all copies.
10
*
11
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18
*/
19
20
#ifndef _PROCESS_ZOMBIE_QUEUE_H
21
#define _PROCESS_ZOMBIE_QUEUE_H
22
#include "pedigree/kernel/compiler.h"
23
#include "pedigree/kernel/processor/types.h"
24
#include "pedigree/kernel/utilities/RequestQueue.h"
25
26
#include <config.h>
27
28
class
Process
;
29
32
class
ZombieObject
{
33
public
:
34
virtual
~ZombieObject
() =
default
;
35
};
36
38
class
ZombieProcess
:
public
ZombieObject
{
39
public
:
40
virtual
~ZombieProcess
();
41
42
#if HOSTED && PEDIGREE_HOSTED_SMOKE_TESTS
43
enum class
ReapPhase {
44
Entered,
45
Reapable,
46
};
47
using
ReapHook = void (*)(
Process
*, ReapPhase);
48
static
EXPORTED_PUBLIC
void
setReapHook(ReapHook hook);
49
#endif
50
51
private
:
52
friend
class
Process
;
53
explicit
ZombieProcess
(
Process
* pProcess);
54
55
Process
* m_pProcess;
56
57
#if HOSTED && PEDIGREE_HOSTED_SMOKE_TESTS
58
static
ReapHook m_ReapHook;
59
#endif
60
};
61
66
class
EXPORTED_PUBLIC
ZombieQueue
:
public
RequestQueue
{
67
public
:
68
ZombieQueue
();
69
virtual
~ZombieQueue
();
70
71
static
ZombieQueue
& instance();
72
73
void
addObject(
ZombieObject
* pObject);
74
75
private
:
76
virtual
uint64_t
executeRequest
(uint64_t p1, uint64_t p2, uint64_t p3, uint64_t p4, uint64_t p5,
77
uint64_t p6, uint64_t p7, uint64_t p8);
78
79
virtual
void
cancelRequest
(
const
Request
& request);
80
81
static
ZombieQueue
m_Instance;
82
};
83
84
#endif
Process
Definition
Process.h:109
RequestQueue::Request
Definition
RequestQueue.h:139
RequestQueue
Definition
RequestQueue.h:52
RequestQueue::cancelRequest
virtual void cancelRequest(const Request &request)
Definition
RequestQueue.h:444
RequestQueue::executeRequest
virtual uint64_t executeRequest(uint64_t p1, uint64_t p2, uint64_t p3, uint64_t p4, uint64_t p5, uint64_t p6, uint64_t p7, uint64_t p8)=0
ZombieObject
Definition
ZombieQueue.h:32
ZombieProcess
Special wrapper object for Process.
Definition
ZombieQueue.h:38
ZombieQueue
Definition
ZombieQueue.h:66
Generated on Sat Oct 3 2026 06:38:07 for The Pedigree Project by
1.9.8