summaryrefslogtreecommitdiff
path: root/legacy/evas/src/bin/dummy_slave.c
diff options
context:
space:
mode:
authorRafael Antognolli <antognolli@gmail.com>2012-06-22 20:31:17 +0000
committerRafael Antognolli <antognolli@gmail.com>2012-06-22 20:31:17 +0000
commit64fecc2faba783ef63a719cbf2868458401cb61a (patch)
treed8cd00b8e05173cd44185e81ed98fa950896ee61 /legacy/evas/src/bin/dummy_slave.c
parentde28f1ed31048b8d899bd932de3b0d95b5bec5f5 (diff)
evas/cserve2: Add font and glyphs loading implementation
to cserve2. Big commit that implements the entire functionality. Besides loading fonts and glyphs, and sharing the glyph bitmaps with clients, it also adds: - new request system, with a much better abstraction; - new working slaves management; - slaves can be threads or process now; - started a debugging and statistics implementation on server. The image caching part still uses the old request and slaves system, but should be changed to use the new one soon and get more easily maintainable. SVN revision: 72699
Diffstat (limited to 'legacy/evas/src/bin/dummy_slave.c')
-rw-r--r--legacy/evas/src/bin/dummy_slave.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/legacy/evas/src/bin/dummy_slave.c b/legacy/evas/src/bin/dummy_slave.c
index a150d67e1f..398d86eceb 100644
--- a/legacy/evas/src/bin/dummy_slave.c
+++ b/legacy/evas/src/bin/dummy_slave.c
@@ -89,8 +89,8 @@ error_send(int fd, Error_Type err)
89 return response_send(fd, ERROR, &err, sizeof(Error_Type)); 89 return response_send(fd, ERROR, &err, sizeof(Error_Type));
90} 90}
91 91
92void * 92static void *
93cserve2_shm_map(const char *name, size_t length, off_t offset) 93_cserve2_shm_map(const char *name, size_t length, off_t offset)
94{ 94{
95 void *map; 95 void *map;
96 int fd; 96 int fd;
@@ -106,11 +106,13 @@ cserve2_shm_map(const char *name, size_t length, off_t offset)
106 return map; 106 return map;
107} 107}
108 108
109void 109/*
110cserve2_shm_unmap(void *map, size_t length) 110static void
111_cserve2_shm_unmap(void *map, size_t length)
111{ 112{
112 munmap(map, length); 113 munmap(map, length);
113} 114}
115*/
114 116
115static Error_Type 117static Error_Type
116image_open(const char *file __UNUSED__, const char *key __UNUSED__, Slave_Msg_Image_Opened *result) 118image_open(const char *file __UNUSED__, const char *key __UNUSED__, Slave_Msg_Image_Opened *result)
@@ -128,8 +130,8 @@ image_open(const char *file __UNUSED__, const char *key __UNUSED__, Slave_Msg_Im
128static Error_Type 130static Error_Type
129image_load(const char *shmfile, Slave_Msg_Image_Load *params) 131image_load(const char *shmfile, Slave_Msg_Image_Load *params)
130{ 132{
131 char *map = cserve2_shm_map(shmfile, params->shm.mmap_size, 133 char *map = _cserve2_shm_map(shmfile, params->shm.mmap_size,
132 params->shm.mmap_offset); 134 params->shm.mmap_offset);
133 if (map == MAP_FAILED) 135 if (map == MAP_FAILED)
134 return CSERVE2_RESOURCE_ALLOCATION_FAILED; 136 return CSERVE2_RESOURCE_ALLOCATION_FAILED;
135 137