Hi

Unused var.

- Lauri
>From 0f52d3c34d1f74b7a98d6375153fe6a1170e5540 Mon Sep 17 00:00:00 2001
From: Lauri Kasanen <[email protected]>
Date: Mon, 11 Jun 2012 22:09:24 +0300
Subject: [PATCH] sched: Remove one unused thread key and its handling functions


Signed-off-by: Lauri Kasanen <[email protected]>
---
 src/include/mk_scheduler.h |    4 ----
 src/mk_scheduler.c         |   16 ----------------
 src/monkey.c               |    1 -
 3 files changed, 0 insertions(+), 21 deletions(-)

diff --git a/src/include/mk_scheduler.h b/src/include/mk_scheduler.h
index ca26aef..b32852b 100644
--- a/src/include/mk_scheduler.h
+++ b/src/include/mk_scheduler.h
@@ -71,7 +71,6 @@ typedef struct
     int max_events;
 } sched_thread_conf;
 
-pthread_key_t epoll_fd;
 pthread_key_t worker_sched_node;
 
 extern pthread_mutex_t mutex_worker_init;
@@ -85,9 +84,6 @@ struct sched_list_node *mk_sched_get_handler_owner(void);
 struct mk_list *mk_sched_get_request_list(void);
 void mk_sched_set_request_list(struct mk_list *list);
 
-int mk_sched_get_thread_poll(void);
-void mk_sched_set_thread_poll(int epoll);
-
 struct sched_list_node *mk_sched_get_thread_conf(void);
 void mk_sched_update_thread_status(struct sched_list_node *sched,
                                    int active, int closed);
diff --git a/src/mk_scheduler.c b/src/mk_scheduler.c
index efcdb34..af1c187 100644
--- a/src/mk_scheduler.c
+++ b/src/mk_scheduler.c
@@ -197,12 +197,6 @@ static void *mk_sched_launch_worker_loop(void *thread_conf)
     mk_utils_worker_rename(thread_name);
     mk_mem_free(thread_name);
 
-    /*
-     * Export epoll filedescriptor to the thread context using a
-     * thread_key.
-     */
-    mk_sched_set_thread_poll(thinfo->epoll_fd);
-
     /* Export known scheduler node to context thread */
     pthread_setspecific(worker_sched_node, (void *) thinfo);
 
@@ -319,16 +313,6 @@ void mk_sched_set_request_list(struct mk_list *list)
     pthread_setspecific(request_list, (void *) list);
 }
 
-void mk_sched_set_thread_poll(int epoll)
-{
-    pthread_setspecific(epoll_fd, (void *) (size_t) epoll);
-}
-
-int mk_sched_get_thread_poll()
-{
-    return (size_t) pthread_getspecific(epoll_fd);
-}
-
 struct sched_list_node *mk_sched_get_thread_conf()
 {
     return pthread_getspecific(worker_sched_node);
diff --git a/src/monkey.c b/src/monkey.c
index 1ef7abd..bbf009c 100644
--- a/src/monkey.c
+++ b/src/monkey.c
@@ -47,7 +47,6 @@ void mk_thread_keys_init(void)
     /* Create thread keys */
     pthread_key_create(&worker_sched_node, NULL);
     pthread_key_create(&request_list, NULL);
-    pthread_key_create(&epoll_fd, NULL);
     pthread_key_create(&mk_epoll_state_k, NULL);
     pthread_key_create(&mk_cache_iov_header, NULL);
     pthread_key_create(&mk_cache_header_lm, NULL);
-- 
1.7.2.1

_______________________________________________
Monkey mailing list
[email protected]
http://lists.monkey-project.com/listinfo/monkey

Reply via email to