The Pedigree Project  0.1
ZombieQueue.cc
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 #include "pedigree/kernel/utilities/ZombieQueue.h"
21 #include "pedigree/kernel/process/Process.h"
22 #include "pedigree/kernel/utilities/new"
23 
24 ZombieQueue ZombieQueue::m_Instance;
25 
26 ZombieQueue::ZombieQueue() : RequestQueue("ZombieQueue")
27 {
28 }
29 
30 ZombieQueue::~ZombieQueue()
31 {
32 }
33 
34 ZombieQueue &ZombieQueue::instance()
35 {
36  return m_Instance;
37 }
38 
39 void ZombieQueue::addObject(ZombieObject *pObject)
40 {
41  addAsyncRequest(1, reinterpret_cast<uint64_t>(pObject));
42 }
43 
45  uint64_t p1, uint64_t p2, uint64_t p3, uint64_t p4, uint64_t p5,
46  uint64_t p6, uint64_t p7, uint64_t p8)
47 {
48  if (!p1)
49  return 0;
50 
51  delete reinterpret_cast<ZombieObject *>(p1);
52 
53  return 0;
54 }
55 
56 ZombieProcess::ZombieProcess(Process *pProcess) : m_pProcess(pProcess)
57 {
58 }
59 
60 ZombieProcess::~ZombieProcess()
61 {
62  delete m_pProcess;
63 }
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)
Definition: ZombieQueue.cc:44