mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-16 15:29:57 +00:00
parent
15a56bd682
commit
da49f86f5b
22
base-hw/src/base/placement_new.h
Normal file
22
base-hw/src/base/placement_new.h
Normal file
@ -0,0 +1,22 @@
|
||||
/*
|
||||
* \brief Placement new operator
|
||||
* \author Martin Stein
|
||||
* \date 2013-11-07
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2013 Genode Labs GmbH
|
||||
*
|
||||
* This file is part of the Genode OS framework, which is distributed
|
||||
* under the terms of the GNU General Public License version 2.
|
||||
*/
|
||||
|
||||
#ifndef _PLACEMENT_NEW_H_
|
||||
#define _PLACEMENT_NEW_H_
|
||||
|
||||
/**
|
||||
* Placement new operator
|
||||
*/
|
||||
inline void *operator new(Genode::size_t, void *at) { return at; }
|
||||
|
||||
#endif /* _PLACEMENT_NEW_H_ */
|
@ -31,8 +31,8 @@
|
||||
/* Genode includes */
|
||||
#include <base/stdint.h>
|
||||
|
||||
inline void *operator new(Genode::size_t, void *at) { return at; }
|
||||
|
||||
/* base-hw includes */
|
||||
#include <placement_new.h>
|
||||
|
||||
template <typename T, int ALIGN = 2, typename... Args>
|
||||
static inline T *unsynchronized_singleton(Args... args)
|
||||
|
@ -18,6 +18,9 @@
|
||||
#include <base/native_types.h>
|
||||
#include <irq_session/irq_session.h>
|
||||
|
||||
/* base-hw includes */
|
||||
#include <placement_new.h>
|
||||
|
||||
/* core includes */
|
||||
#include <kernel/signal_receiver.h>
|
||||
|
||||
@ -125,15 +128,6 @@ class Kernel::Irq
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Placement-new operator
|
||||
*
|
||||
* \param p destination of new object
|
||||
*
|
||||
* \return destination of new object
|
||||
*/
|
||||
void * operator new (size_t, void * p) { return p; }
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
@ -14,6 +14,9 @@
|
||||
/* Genode includes */
|
||||
#include <base/thread_state.h>
|
||||
|
||||
/* base-hw includes */
|
||||
#include <placement_new.h>
|
||||
|
||||
/* core includes */
|
||||
#include <kernel/kernel.h>
|
||||
#include <kernel/thread.h>
|
||||
|
@ -47,11 +47,6 @@ class Kernel::Vm : public Object<Vm, MAX_VMS, Vm_ids, vm_ids, vm_pool>,
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Placement new
|
||||
*/
|
||||
void * operator new (size_t, void * p) { return p; }
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
@ -13,7 +13,10 @@
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/printf.h>
|
||||
|
||||
/* base-hw includes */
|
||||
#include <kernel/syscalls.h>
|
||||
#include <placement_new.h>
|
||||
|
||||
/* core includes */
|
||||
#include <signal_session_component.h>
|
||||
@ -21,12 +24,6 @@
|
||||
using namespace Genode;
|
||||
|
||||
|
||||
/**
|
||||
* Placement new
|
||||
*/
|
||||
void * operator new (size_t, void * p) { return p; }
|
||||
|
||||
|
||||
Signal_session_component::Signal_session_component(Allocator * const md,
|
||||
size_t const ram_quota) :
|
||||
_md_alloc(md, ram_quota),
|
||||
|
@ -18,6 +18,9 @@
|
||||
#include <util/register.h>
|
||||
#include <base/printf.h>
|
||||
|
||||
/* base-hw includes */
|
||||
#include <placement_new.h>
|
||||
|
||||
namespace Arm
|
||||
{
|
||||
using namespace Genode;
|
||||
@ -312,11 +315,6 @@ namespace Arm
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Placement new operator
|
||||
*/
|
||||
void * operator new (size_t, void * p) { return p; }
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user