mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 23:42:32 +00:00
os: Remove new operator from packet_stream.h
This commit is contained in:
parent
c4dea1057b
commit
847ddbf72e
@ -80,6 +80,7 @@
|
||||
#include <base/signal.h>
|
||||
#include <dataspace/client.h>
|
||||
#include <util/string.h>
|
||||
#include <util/construct_at.h>
|
||||
|
||||
namespace Genode {
|
||||
|
||||
@ -512,18 +513,6 @@ struct Genode::Packet_stream_policy
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Placement new operator for constructing packet-descriptor queues
|
||||
*
|
||||
* The third argument is only there to let the compiler choose this overloaded
|
||||
* new operator rather than Genode's new operator.
|
||||
*
|
||||
* This operator should not be used outside the packet-stream interface.
|
||||
*/
|
||||
inline void *operator new(Genode::size_t size, void *addr,
|
||||
Genode::Packet_stream_base *) { return addr; }
|
||||
|
||||
|
||||
/**
|
||||
* Originator of a packet stream
|
||||
*/
|
||||
@ -573,10 +562,10 @@ class Genode::Packet_stream_source : private Packet_stream_base
|
||||
_packet_alloc(packet_alloc),
|
||||
|
||||
/* construct packet-descriptor queues */
|
||||
_submit_transmitter(new (_submit_queue_local_base(), this)
|
||||
Submit_queue(Submit_queue::PRODUCER)),
|
||||
_ack_receiver(new (_ack_queue_local_base(), this)
|
||||
Ack_queue(Ack_queue::CONSUMER))
|
||||
_submit_transmitter(construct_at<Submit_queue>(_submit_queue_local_base(),
|
||||
Submit_queue::PRODUCER)),
|
||||
_ack_receiver(construct_at<Ack_queue>(_ack_queue_local_base(),
|
||||
Ack_queue::CONSUMER))
|
||||
{
|
||||
/* initialize packet allocator */
|
||||
_packet_alloc->add_range(_bulk_buffer_offset,
|
||||
@ -739,10 +728,10 @@ class Genode::Packet_stream_sink : private Packet_stream_base
|
||||
Packet_stream_base(transport_ds, sizeof(Submit_queue), sizeof(Ack_queue)),
|
||||
|
||||
/* construct packet-descriptor queues */
|
||||
_submit_receiver(new (_submit_queue_local_base(), this)
|
||||
Submit_queue(Submit_queue::CONSUMER)),
|
||||
_ack_transmitter(new (_ack_queue_local_base(), this)
|
||||
Ack_queue(Ack_queue::PRODUCER))
|
||||
_submit_receiver(construct_at<Submit_queue>(_submit_queue_local_base(),
|
||||
Submit_queue::CONSUMER)),
|
||||
_ack_transmitter(construct_at<Ack_queue>(_ack_queue_local_base(),
|
||||
Ack_queue::PRODUCER))
|
||||
{ }
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user