Browse Source

MDEV-16264: Minor cleanup

Add missing static qualifiers.
pull/1412/head
Marko Mäkelä 6 years ago
parent
commit
15c7f684ec
  1. 9
      storage/innobase/include/os0file.h
  2. 27
      storage/innobase/os/os0file.cc

9
storage/innobase/include/os0file.h

@ -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!

27
storage/innobase/os/os0file.cc

@ -123,12 +123,12 @@ public:
}
};
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.

Loading…
Cancel
Save