Commit 15c7f684 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-16264: Minor cleanup

Add missing static qualifiers.
parent a69cff29
......@@ -1360,14 +1360,13 @@ os_aio_init(
/**
Frees the asynchronous io system. */
void
os_aio_free();
void os_aio_free();
struct os_aio_userdata_t
{
fil_node_t* node;
IORequest type;
void* message;
fil_node_t* node;
IORequest type;
void* message;
};
/**
NOTE! Use the corresponding macro os_aio(), not directly this function!
......
......@@ -123,12 +123,12 @@ class io_slots
}
};
io_slots* read_slots;
io_slots* write_slots;
io_slots* ibuf_slots;
static io_slots *read_slots;
static io_slots *write_slots;
static io_slots *ibuf_slots;
/** Number of retries for partial I/O's */
static const ulint NUM_RETRIES_ON_PARTIAL_IO = 10;
constexpr ulint NUM_RETRIES_ON_PARTIAL_IO = 10;
/* This specifies the file permissions InnoDB uses when it creates files in
Unix; the value of os_innodb_umask is initialized in ha_innodb.cc to
......@@ -4047,24 +4047,25 @@ bool os_aio_init(ulint n_reader_threads, ulint n_writer_threads, ulint)
return true;
}
void os_aio_free(void)
void os_aio_free()
{
srv_thread_pool->disable_aio();
delete read_slots;
delete write_slots;
delete ibuf_slots;
srv_thread_pool->disable_aio();
delete read_slots;
delete write_slots;
delete ibuf_slots;
read_slots= nullptr;
write_slots= nullptr;
ibuf_slots= nullptr;
}
/** Waits until there are no pending writes. There can
be other, synchronous, pending writes. */
void
os_aio_wait_until_no_pending_writes()
void os_aio_wait_until_no_pending_writes()
{
write_slots->wait();
write_slots->wait();
}
/**
NOTE! Use the corresponding macro os_aio(), not directly this function!
Requests an asynchronous i/o operation.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment