Skip to content

Commit

Permalink
[#117] Move the shmem defs
Browse files Browse the repository at this point in the history
  • Loading branch information
jesperpedersen committed Dec 1, 2020
1 parent dbb852e commit 76f1e93
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 9 deletions.
2 changes: 2 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ add_compile_options(-D_POSIX_C_SOURCE=200809L)
add_compile_options(-D__USE_ISOC11)
add_compile_options(-D_GNU_SOURCE)

add_link_options(-Wl,--no-undefined)

if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
add_compile_options(-Wstrict-prototypes)
endif()
Expand Down
3 changes: 0 additions & 3 deletions src/admin.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ static int update_user(char* users_path, char* username, char* password);
static int remove_user(char* users_path, char* username);
static int list_users(char* users_path);

void* shmem = NULL;
void* pipeline_shmem = NULL;

static void
version(void)
{
Expand Down
3 changes: 0 additions & 3 deletions src/cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ static int reset(SSL* ssl, int socket);
static int reset_server(SSL* ssl, int socket, char* server);
static int switch_to(SSL* ssl, int socket, char* server);

void* shmem = NULL;
void* pipeline_shmem = NULL;

static void
version(void)
{
Expand Down
3 changes: 3 additions & 0 deletions src/libpgagroal/shmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
#include <stdlib.h>
#include <sys/mman.h>

void* shmem = NULL;
void* pipeline_shmem = NULL;

int
pgagroal_create_shared_memory(size_t size, unsigned char hp, void** shmem)
{
Expand Down
3 changes: 0 additions & 3 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,6 @@ struct client
struct client* next;
};

void* shmem = NULL;
void* pipeline_shmem = NULL;

static volatile int keep_running = 1;
static char** argv_ptr;
static struct ev_loop* main_loop = NULL;
Expand Down

0 comments on commit 76f1e93

Please sign in to comment.