summaryrefslogtreecommitdiff
path: root/mysys/mf_keycache.c
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2015-01-19 14:19:05 +0100
committerSergei Golubchik <sergii@pisem.net>2015-01-19 14:19:05 +0100
commitc75eec8e0de23a6314ce021bafeb4ab4eeb1105f (patch)
treeb9f8ed1d474338f48014a8a48a384ce7bb9610c5 /mysys/mf_keycache.c
parente2a27682788afacc738914976014b324b1be6ad9 (diff)
downloadmariadb-git-c75eec8e0de23a6314ce021bafeb4ab4eeb1105f.tar.gz
rename st_my_thread_var::opt_info -> st_my_thread_var::keycache_link
Diffstat (limited to 'mysys/mf_keycache.c')
-rw-r--r--mysys/mf_keycache.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/mysys/mf_keycache.c b/mysys/mf_keycache.c
index b9da197d311..c0cd1594e72 100644
--- a/mysys/mf_keycache.c
+++ b/mysys/mf_keycache.c
@@ -1370,7 +1370,7 @@ static void link_block(SIMPLE_KEY_CACHE_CB *keycache, BLOCK_LINK *block,
keycache->waiting_for_block.last_thread;
struct st_my_thread_var *first_thread= last_thread->next;
struct st_my_thread_var *next_thread= first_thread;
- HASH_LINK *hash_link= (HASH_LINK *) first_thread->opt_info;
+ HASH_LINK *hash_link= (HASH_LINK *) first_thread->keycache_link;
struct st_my_thread_var *thread;
do
{
@@ -1380,7 +1380,7 @@ static void link_block(SIMPLE_KEY_CACHE_CB *keycache, BLOCK_LINK *block,
We notify about the event all threads that ask
for the same page as the first thread in the queue
*/
- if ((HASH_LINK *) thread->opt_info == hash_link)
+ if ((HASH_LINK *) thread->keycache_link == hash_link)
{
KEYCACHE_DBUG_PRINT("link_block: signal", ("thread %ld", thread->id));
keycache_pthread_cond_signal(&thread->suspend);
@@ -1714,7 +1714,7 @@ static void unlink_hash(SIMPLE_KEY_CACHE_CB *keycache, HASH_LINK *hash_link)
keycache->waiting_for_hash_link.last_thread;
struct st_my_thread_var *first_thread= last_thread->next;
struct st_my_thread_var *next_thread= first_thread;
- KEYCACHE_PAGE *first_page= (KEYCACHE_PAGE *) (first_thread->opt_info);
+ KEYCACHE_PAGE *first_page= (KEYCACHE_PAGE *) (first_thread->keycache_link);
struct st_my_thread_var *thread;
hash_link->file= first_page->file;
@@ -1723,7 +1723,7 @@ static void unlink_hash(SIMPLE_KEY_CACHE_CB *keycache, HASH_LINK *hash_link)
{
KEYCACHE_PAGE *page;
thread= next_thread;
- page= (KEYCACHE_PAGE *) thread->opt_info;
+ page= (KEYCACHE_PAGE *) thread->keycache_link;
next_thread= thread->next;
/*
We notify about the event all threads that ask
@@ -1812,13 +1812,13 @@ restart:
KEYCACHE_DBUG_PRINT("get_hash_link", ("waiting"));
page.file= file;
page.filepos= filepos;
- thread->opt_info= (void *) &page;
+ thread->keycache_link= (void *) &page;
link_into_queue(&keycache->waiting_for_hash_link, thread);
KEYCACHE_DBUG_PRINT("get_hash_link: wait",
("suspend thread %ld", thread->id));
keycache_pthread_cond_wait(&thread->suspend,
&keycache->cache_lock);
- thread->opt_info= NULL;
+ thread->keycache_link= NULL;
goto restart;
}
hash_link->file= file;
@@ -1976,7 +1976,7 @@ restart:
for another file/pos.
*/
thread= my_thread_var;
- thread->opt_info= (void *) hash_link;
+ thread->keycache_link= (void *) hash_link;
link_into_queue(&keycache->waiting_for_block, thread);
do
{
@@ -1985,7 +1985,7 @@ restart:
keycache_pthread_cond_wait(&thread->suspend,
&keycache->cache_lock);
} while (thread->next);
- thread->opt_info= NULL;
+ thread->keycache_link= NULL;
/*
A block should now be assigned to the hash_link. But it may
still need to be evicted. Anyway, we should re-check the
@@ -2323,7 +2323,7 @@ restart:
*/
struct st_my_thread_var *thread= my_thread_var;
- thread->opt_info= (void *) hash_link;
+ thread->keycache_link= (void *) hash_link;
link_into_queue(&keycache->waiting_for_block, thread);
do
{
@@ -2333,7 +2333,7 @@ restart:
&keycache->cache_lock);
}
while (thread->next);
- thread->opt_info= NULL;
+ thread->keycache_link= NULL;
/* Assert that block has a request registered. */
DBUG_ASSERT(hash_link->block->requests);
/* Assert that block is not in LRU ring. */
@@ -4588,7 +4588,7 @@ static void keycache_dump(SIMPLE_KEY_CACHE_CB *keycache)
do
{
thread=thread->next;
- page= (KEYCACHE_PAGE *) thread->opt_info;
+ page= (KEYCACHE_PAGE *) thread->keycache_link;
fprintf(keycache_dump_file,
"thread:%u, (file,filepos)=(%u,%lu)\n",
thread->id,(uint) page->file,(ulong) page->filepos);
@@ -4604,7 +4604,7 @@ static void keycache_dump(SIMPLE_KEY_CACHE_CB *keycache)
do
{
thread=thread->next;
- hash_link= (HASH_LINK *) thread->opt_info;
+ hash_link= (HASH_LINK *) thread->keycache_link;
fprintf(keycache_dump_file,
"thread:%u hash_link:%u (file,filepos)=(%u,%lu)\n",
thread->id, (uint) HASH_LINK_NUMBER(hash_link),