MT#55283 move stream_fd into shm

Change-Id: I047777f3bb7db579362a535ffd90aef3b180241d
mr26.1
Richard Fuchs 5 months ago
parent a190d56a53
commit 707d02ddac

@ -194,6 +194,13 @@ bool kernel_setup_table(unsigned int id) {
return true;
}
void *kernel_shm_alloc(size_t s) {
return bufferpool_alloc(shm_bufferpool, s);
}
void *kernel_shm_alloc0(size_t s) {
return bufferpool_alloc0(shm_bufferpool, s);
}
void kernel_shutdown_table(void) {
if (!kernel.is_open)
return;

@ -3939,13 +3939,15 @@ static void stream_fd_free(stream_fd *f) {
mutex_destroy(&f->lock);
obj_put(f->call);
bufferpool_unref(f);
}
stream_fd *stream_fd_new(struct socket_port_link *spl, call_t *call, struct local_intf *lif) {
stream_fd *sfd;
struct poller_item pi;
sfd = obj_alloc0(stream_fd, stream_fd_free);
sfd = obj_alloc_full(stream_fd, NULL, kernel_shm_alloc0, stream_fd_free);
mutex_init(&sfd->lock);
sfd->unique_id = t_queue_get_length(&call->stream_fds);
sfd->call = obj_get(call);

@ -32,6 +32,9 @@ bool kernel_setup_table(unsigned int);
bool kernel_init_table(void);
void kernel_shutdown_table(void);
void *kernel_shm_alloc(size_t s);
void *kernel_shm_alloc0(size_t s);
bool kernel_add_stream(struct rtpengine_command_add_target *);
void kernel_add_destination(struct rtpengine_command_destination *);

Loading…
Cancel
Save