summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2013-10-11 09:32:09 +0100
committerStefan Schmidt <s.schmidt@samsung.com>2013-10-11 09:36:35 +0100
commitee155b771ddb8f063105f013c652b65f2ff663c1 (patch)
tree3298f9b589679e6fb6a18bd980224d480a7a031e
parent68a4e85483ec50c12ef3984a33e42c3bdd373790 (diff)
Revert "Revert "eina: use Eina_Spinlock for Eina_Chained_Mempool.""
You can bet on reverting makes people speed up the process in fixing it. Revert the revert here now that Cedric fixed it in eina. This reverts commit 875e7cf74de68d05f6fd28d26ad8bddab7782316.
-rw-r--r--ChangeLog3
-rw-r--r--NEWS2
-rw-r--r--src/Makefile_Ecore_Wayland.am1
-rw-r--r--src/lib/ecore_wayland/Ecore_Wayland.h92
-rw-r--r--src/lib/ecore_wayland/ecore_wl.c8
-rw-r--r--src/lib/ecore_wayland/ecore_wl_private.h2
-rw-r--r--src/lib/ecore_wayland/ecore_wl_subsurf.c191
-rw-r--r--src/lib/ecore_wayland/ecore_wl_window.c2
-rw-r--r--src/modules/eina/mp/chained_pool/eina_chained_mempool.c20
9 files changed, 13 insertions, 308 deletions
diff --git a/ChangeLog b/ChangeLog
index bc5ce0c02e..ba374ef462 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,7 +8,8 @@
82013-10-11 Cedric Bail 82013-10-11 Cedric Bail
9 9
10 * Eina: add Eina_Spinlock API, 10 * Eina: add Eina_Spinlock API,
11 use Eina_Spinlock in Eina_Log, replace Eina_Lock by Eina_Spinlock in Eina_Stringshare. 11 use Eina_Spinlock in Eina_Log, replace Eina_Lock by Eina_Spinlock in Eina_Stringshare,
12 Eina_Chained_Mempool.
12 * Eet: replace Eina_Lock by Eina_Spinlock in Eet_Dictionnary. 13 * Eet: replace Eina_Lock by Eina_Spinlock in Eet_Dictionnary.
13 * Evas: replace Eina_Lock by Eina_Spinlock in Evas_ScaleCache, Evas_Async_Events and Image_Entry. 14 * Evas: replace Eina_Lock by Eina_Spinlock in Evas_ScaleCache, Evas_Async_Events and Image_Entry.
14 * Ecore: use Eina_Spinlock for Ecore_Thread. 15 * Ecore: use Eina_Spinlock for Ecore_Thread.
diff --git a/NEWS b/NEWS
index fa799cbfc3..210b8f55dd 100644
--- a/NEWS
+++ b/NEWS
@@ -200,7 +200,7 @@ Improvements:
200 - Eina_Tiler now take tile size into account. 200 - Eina_Tiler now take tile size into account.
201 - Improve support for 64bits system. 201 - Improve support for 64bits system.
202 - eina_strlcat now work with a NULL source. 202 - eina_strlcat now work with a NULL source.
203 - Use Eina_Spinlock for eina_log, eina_stringshare. 203 - Use Eina_Spinlock for eina_log, eina_stringshare and chained_mempool.
204 * Eet: 204 * Eet:
205 - Display more information with eet -l -v. 205 - Display more information with eet -l -v.
206 - Force thread to always run during eet_cache_concurrency test. 206 - Force thread to always run during eet_cache_concurrency test.
diff --git a/src/Makefile_Ecore_Wayland.am b/src/Makefile_Ecore_Wayland.am
index b2c66a19cb..607d26e032 100644
--- a/src/Makefile_Ecore_Wayland.am
+++ b/src/Makefile_Ecore_Wayland.am
@@ -14,7 +14,6 @@ lib/ecore_wayland/ecore_wl_dnd.c \
14lib/ecore_wayland/ecore_wl_input.c \ 14lib/ecore_wayland/ecore_wl_input.c \
15lib/ecore_wayland/ecore_wl_output.c \ 15lib/ecore_wayland/ecore_wl_output.c \
16lib/ecore_wayland/ecore_wl_window.c \ 16lib/ecore_wayland/ecore_wl_window.c \
17lib/ecore_wayland/ecore_wl_subsurf.c \
18lib/ecore_wayland/ecore_wl_private.h 17lib/ecore_wayland/ecore_wl_private.h
19 18
20lib_ecore_wayland_libecore_wayland_la_BUILT_SOURCES = \ 19lib_ecore_wayland_libecore_wayland_la_BUILT_SOURCES = \
diff --git a/src/lib/ecore_wayland/Ecore_Wayland.h b/src/lib/ecore_wayland/Ecore_Wayland.h
index 30545b7343..05ceb00daf 100644
--- a/src/lib/ecore_wayland/Ecore_Wayland.h
+++ b/src/lib/ecore_wayland/Ecore_Wayland.h
@@ -35,7 +35,6 @@ typedef struct _Ecore_Wl_Display Ecore_Wl_Display;
35typedef struct _Ecore_Wl_Output Ecore_Wl_Output; 35typedef struct _Ecore_Wl_Output Ecore_Wl_Output;
36typedef struct _Ecore_Wl_Input Ecore_Wl_Input; 36typedef struct _Ecore_Wl_Input Ecore_Wl_Input;
37typedef struct _Ecore_Wl_Global Ecore_Wl_Global; /** @since 1.7.6 */ 37typedef struct _Ecore_Wl_Global Ecore_Wl_Global; /** @since 1.7.6 */
38typedef struct _Ecore_Wl_Subsurf Ecore_Wl_Subsurf; /** @since 1.8 */
39 38
40# ifndef _ECORE_WAYLAND_WINDOW_PREDEF 39# ifndef _ECORE_WAYLAND_WINDOW_PREDEF
41typedef struct _Ecore_Wl_Window Ecore_Wl_Window; 40typedef struct _Ecore_Wl_Window Ecore_Wl_Window;
@@ -102,7 +101,6 @@ struct _Ecore_Wl_Display
102 struct wl_display *display; 101 struct wl_display *display;
103 struct wl_registry *registry; 102 struct wl_registry *registry;
104 struct wl_compositor *compositor; 103 struct wl_compositor *compositor;
105 struct wl_subcompositor *subcompositor;
106 struct wl_shell *shell; 104 struct wl_shell *shell;
107 struct wl_shell *desktop_shell; 105 struct wl_shell *desktop_shell;
108 struct wl_shm *shm; 106 struct wl_shm *shm;
@@ -253,8 +251,6 @@ struct _Ecore_Wl_Window
253 /* FIXME: Ideally we should record the cursor name for this window 251 /* FIXME: Ideally we should record the cursor name for this window
254 * so we can compare and avoid unnecessary cursor set calls to wayland */ 252 * so we can compare and avoid unnecessary cursor set calls to wayland */
255 253
256 Ecore_Wl_Subsurf *subsurfs;
257
258 void *data; 254 void *data;
259}; 255};
260 256
@@ -385,7 +381,6 @@ struct _Ecore_Wl_Event_Interfaces_Bound
385 * @li @ref Ecore_Wl_Window_Group 381 * @li @ref Ecore_Wl_Window_Group
386 * @li @ref Ecore_Wl_Input_Group 382 * @li @ref Ecore_Wl_Input_Group
387 * @li @ref Ecore_Wl_Dnd_Group 383 * @li @ref Ecore_Wl_Dnd_Group
388 * @li @ref Ecore_Wl_Subsurf
389 */ 384 */
390 385
391EAPI extern int ECORE_WL_EVENT_MOUSE_IN; 386EAPI extern int ECORE_WL_EVENT_MOUSE_IN;
@@ -869,93 +864,6 @@ EAPI struct wl_array *ecore_wl_dnd_drag_types_get(Ecore_Wl_Input *input);
869 864
870EAPI void ecore_wl_server_mode_set(Eina_Bool on); 865EAPI void ecore_wl_server_mode_set(Eina_Bool on);
871 866
872/**
873 * @defgroup Ecore_Wl_Subsurf Functions to manipulate subsurfaces.
874 * @ingroup Ecore_Wl_Group
875 *
876 * Functions to manipulate wayland subsurfaces, using Ecore_Wl_Subsurf.
877 *
878 * This API is intended to expose Wayland subsurface functionality, although it
879 * should not be necessary for most applications to use it, as soon as we have
880 * means to make Evas automatically switch Evas images to use subsurfaces.
881 *
882 * It can/should be used, for instance, when subsurfaces are needed to be not
883 * in sync with the main window surface.
884 */
885
886/**
887 * Create and return a new subsurface.
888 *
889 * Create a new surface (and subsurface interface), with the parent surface
890 * being the one associated with the given @param win.
891 *
892 * The @param win must be visible, otherwise there will be no surface created
893 * for it yet.
894 *
895 * @ingroup Ecore_Wl_Subsurf
896 * @since 1.8
897 */
898EAPI Ecore_Wl_Subsurf *ecore_wl_subsurf_create(Ecore_Wl_Window *win);
899
900/**
901 * Destroy the given subsurface, as well as the surface associated with it.
902 *
903 * @ingroup Ecore_Wl_Subsurf
904 * @since 1.8
905 */
906EAPI void ecore_wl_subsurf_del(Ecore_Wl_Subsurf *ess);
907
908/**
909 * Return the wl_surface associated with this subsurface.
910 *
911 * @ingroup Ecore_Wl_Subsurf
912 * @since 1.8
913 */
914EAPI struct wl_surface *ecore_wl_subsurf_surface_get(Ecore_Wl_Subsurf *ess);
915
916/**
917 * Set the position of this subsurface, relative to its parent surface.
918 *
919 * @ingroup Ecore_Wl_Subsurf
920 * @since 1.8
921 */
922EAPI void ecore_wl_subsurf_position_set(Ecore_Wl_Subsurf *ess, int x, int y);
923
924/**
925 * Get the position of this subsurface, relative to its parent surface.
926 *
927 * @ingroup Ecore_Wl_Subsurf
928 * @since 1.8
929 */
930EAPI void ecore_wl_subsurf_position_get(Ecore_Wl_Subsurf *ess, int *x, int *y);
931
932/**
933 * @ingroup Ecore_Wl_Subsurf
934 * @since 1.8
935 */
936EAPI void ecore_wl_subsurf_place_above(Ecore_Wl_Subsurf *ess, struct wl_surface *surface);
937
938/**
939 * @ingroup Ecore_Wl_Subsurf
940 * @since 1.8
941 */
942EAPI void ecore_wl_subsurf_place_below(Ecore_Wl_Subsurf *ess, struct wl_surface *surface);
943
944/**
945 * @ingroup Ecore_Wl_Subsurf
946 * @since 1.8
947 */
948EAPI void ecore_wl_subsurf_sync_set(Ecore_Wl_Subsurf *ess, Eina_Bool val);
949
950/**
951 * Set an opaque region for the given subsurface.
952 *
953 * Use a 0x0 region size to unset the opaque region.
954 *
955 * @ingroup Ecore_Wl_Subsurf
956 * @since 1.8
957 */
958EAPI void ecore_wl_subsurf_opaque_region_set(Ecore_Wl_Subsurf *ess, int x, int y, int w, int h);
959#ifdef __cplusplus 867#ifdef __cplusplus
960} 868}
961#endif 869#endif
diff --git a/src/lib/ecore_wayland/ecore_wl.c b/src/lib/ecore_wayland/ecore_wl.c
index ee614e0e4b..acce7282fb 100644
--- a/src/lib/ecore_wayland/ecore_wl.c
+++ b/src/lib/ecore_wayland/ecore_wl.c
@@ -4,7 +4,6 @@
4 4
5#include <fcntl.h> 5#include <fcntl.h>
6#include "ecore_wl_private.h" 6#include "ecore_wl_private.h"
7#include <subsurface-client-protocol.h>
8 7
9/* local function prototypes */ 8/* local function prototypes */
10static Eina_Bool _ecore_wl_shutdown(Eina_Bool close); 9static Eina_Bool _ecore_wl_shutdown(Eina_Bool close);
@@ -398,8 +397,6 @@ _ecore_wl_shutdown(Eina_Bool close)
398 wl_data_device_manager_destroy(_ecore_wl_disp->wl.data_device_manager); 397 wl_data_device_manager_destroy(_ecore_wl_disp->wl.data_device_manager);
399 if (_ecore_wl_disp->wl.compositor) 398 if (_ecore_wl_disp->wl.compositor)
400 wl_compositor_destroy(_ecore_wl_disp->wl.compositor); 399 wl_compositor_destroy(_ecore_wl_disp->wl.compositor);
401 if (_ecore_wl_disp->wl.subcompositor)
402 wl_subcompositor_destroy(_ecore_wl_disp->wl.subcompositor);
403 if (_ecore_wl_disp->wl.display) 400 if (_ecore_wl_disp->wl.display)
404 { 401 {
405 wl_registry_destroy(_ecore_wl_disp->wl.registry); 402 wl_registry_destroy(_ecore_wl_disp->wl.registry);
@@ -518,11 +515,6 @@ _ecore_wl_cb_handle_global(void *data, struct wl_registry *registry, unsigned in
518 ewd->wl.compositor = 515 ewd->wl.compositor =
519 wl_registry_bind(registry, id, &wl_compositor_interface, 3); 516 wl_registry_bind(registry, id, &wl_compositor_interface, 3);
520 } 517 }
521 else if (!strcmp(interface, "wl_subcompositor"))
522 {
523 ewd->wl.subcompositor =
524 wl_registry_bind(registry, id, &wl_subcompositor_interface, 1);
525 }
526 else if (!strcmp(interface, "wl_output")) 518 else if (!strcmp(interface, "wl_output"))
527 _ecore_wl_output_add(ewd, id); 519 _ecore_wl_output_add(ewd, id);
528 else if (!strcmp(interface, "wl_seat")) 520 else if (!strcmp(interface, "wl_seat"))
diff --git a/src/lib/ecore_wayland/ecore_wl_private.h b/src/lib/ecore_wayland/ecore_wl_private.h
index b83aae38eb..dc034af8d8 100644
--- a/src/lib/ecore_wayland/ecore_wl_private.h
+++ b/src/lib/ecore_wayland/ecore_wl_private.h
@@ -95,6 +95,4 @@ void _ecore_wl_dnd_del(Ecore_Wl_Dnd_Source *source);
95void _ecore_wl_events_init(void); 95void _ecore_wl_events_init(void);
96void _ecore_wl_events_shutdown(void); 96void _ecore_wl_events_shutdown(void);
97 97
98void _ecore_wl_subsurfs_del_all(Ecore_Wl_Window *win);
99
100#endif 98#endif
diff --git a/src/lib/ecore_wayland/ecore_wl_subsurf.c b/src/lib/ecore_wayland/ecore_wl_subsurf.c
deleted file mode 100644
index 4e144fa084..0000000000
--- a/src/lib/ecore_wayland/ecore_wl_subsurf.c
+++ /dev/null
@@ -1,191 +0,0 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include "ecore_wl_private.h"
6#include <subsurface-client-protocol.h>
7
8struct _Ecore_Wl_Subsurf
9{
10 EINA_INLIST;
11 Ecore_Wl_Window *parent_win;
12 struct wl_surface *surface;
13 struct wl_subsurface *subsurface;
14
15 int x, y;
16
17 Eina_Bool sync : 1;
18};
19
20EAPI Ecore_Wl_Subsurf *
21ecore_wl_subsurf_create(Ecore_Wl_Window *win)
22{
23 struct wl_subsurface *subsurface;
24 struct wl_surface *surface;
25 Ecore_Wl_Subsurf *ess;
26
27 LOGFN(__FILE__, __LINE__, __FUNCTION__);
28
29 if (!win) return NULL;
30 if (!win->surface) return NULL;
31 if (!_ecore_wl_disp->wl.subcompositor) return NULL;
32
33 surface = wl_compositor_create_surface(_ecore_wl_disp->wl.compositor);
34 if (!surface)
35 return NULL;
36
37 subsurface = wl_subcompositor_get_subsurface
38 (_ecore_wl_disp->wl.subcompositor, surface, win->surface);
39 if (!subsurface)
40 {
41 wl_surface_destroy(surface);
42 return NULL;
43 }
44
45 ess = calloc(1, sizeof(*ess));
46 ess->surface = surface;
47 ess->subsurface = subsurface;
48 ess->parent_win = win;
49
50 win->subsurfs = (Ecore_Wl_Subsurf *)eina_inlist_append
51 (EINA_INLIST_GET(win->subsurfs), EINA_INLIST_GET(ess));
52
53 return ess;
54}
55
56static void
57_ecore_wl_subsurf_destroy(Ecore_Wl_Subsurf *ess)
58{
59 Ecore_Wl_Window *parent;
60
61 wl_subsurface_destroy(ess->subsurface);
62 wl_surface_destroy(ess->surface);
63
64 parent = ess->parent_win;
65 parent->subsurfs = (Ecore_Wl_Subsurf *)eina_inlist_remove
66 (EINA_INLIST_GET(parent->subsurfs), EINA_INLIST_GET(ess));
67
68 free(ess);
69}
70
71EAPI void
72ecore_wl_subsurf_del(Ecore_Wl_Subsurf *ess)
73{
74 LOGFN(__FILE__, __LINE__, __FUNCTION__);
75
76 if (!ess) return;
77
78 _ecore_wl_subsurf_destroy(ess);
79}
80
81void
82_ecore_wl_subsurfs_del_all(Ecore_Wl_Window *win)
83{
84 Ecore_Wl_Subsurf *ess;
85
86 if (!win) return;
87
88 EINA_INLIST_FREE(win->subsurfs, ess)
89 {
90 _ecore_wl_subsurf_destroy(ess);
91 }
92}
93
94EAPI struct wl_surface *
95ecore_wl_subsurf_surface_get(Ecore_Wl_Subsurf *ess)
96{
97 LOGFN(__FILE__, __LINE__, __FUNCTION__);
98
99 if (!ess) return NULL;
100
101 return ess->surface;
102}
103
104EAPI void
105ecore_wl_subsurf_position_set(Ecore_Wl_Subsurf *ess, int x, int y)
106{
107 LOGFN(__FILE__, __LINE__, __FUNCTION__);
108
109 if (!ess) return;
110
111 if ((x == ess->x) && (y == ess->y))
112 return;
113
114 ess->x = x;
115 ess->y = y;
116
117 wl_subsurface_set_position(ess->subsurface, x, y);
118}
119
120EAPI void
121ecore_wl_subsurf_position_get(Ecore_Wl_Subsurf *ess, int *x, int *y)
122{
123 LOGFN(__FILE__, __LINE__, __FUNCTION__);
124
125 if (!ess) return;
126
127 if (x) *x = ess->x;
128 if (y) *y = ess->y;
129}
130
131EAPI void
132ecore_wl_subsurf_place_above(Ecore_Wl_Subsurf *ess, struct wl_surface *surface)
133{
134 LOGFN(__FILE__, __LINE__, __FUNCTION__);
135
136 if (!ess) return;
137 if (!surface) return;
138
139 wl_subsurface_place_above(ess->subsurface, surface);
140}
141
142EAPI void
143ecore_wl_subsurf_place_below(Ecore_Wl_Subsurf *ess, struct wl_surface *surface)
144{
145 LOGFN(__FILE__, __LINE__, __FUNCTION__);
146
147 if (!ess) return;
148 if (!surface) return;
149
150 wl_subsurface_place_below(ess->subsurface, surface);
151}
152
153EAPI void
154ecore_wl_subsurf_sync_set(Ecore_Wl_Subsurf *ess, Eina_Bool val)
155{
156 LOGFN(__FILE__, __LINE__, __FUNCTION__);
157
158 if (!ess) return;
159
160 val = !!val;
161 if (val == ess->sync) return;
162
163 ess->sync = val;
164
165 if (ess->sync)
166 wl_subsurface_set_sync(ess->subsurface);
167 else
168 wl_subsurface_set_desync(ess->subsurface);
169}
170
171EAPI void
172ecore_wl_subsurf_opaque_region_set(Ecore_Wl_Subsurf *ess, int x, int y, int w, int h)
173{
174 Ecore_Wl_Window *parent;
175 struct wl_region *region = NULL;
176
177 LOGFN(__FILE__, __LINE__, __FUNCTION__);
178
179 if (!ess) return;
180
181 if ((w > 0) && (h > 0))
182 {
183 parent = ess->parent_win;
184 region = wl_compositor_create_region(parent->display->wl.compositor);
185 wl_region_add(region, x, y, w, h);
186 wl_surface_set_opaque_region(ess->surface, region);
187 wl_region_destroy(region);
188 }
189 else
190 wl_surface_set_opaque_region(ess->surface, NULL);
191}
diff --git a/src/lib/ecore_wayland/ecore_wl_window.c b/src/lib/ecore_wayland/ecore_wl_window.c
index 4ec78c8460..cd5aabe7ad 100644
--- a/src/lib/ecore_wayland/ecore_wl_window.c
+++ b/src/lib/ecore_wayland/ecore_wl_window.c
@@ -114,8 +114,6 @@ ecore_wl_window_free(Ecore_Wl_Window *win)
114 if (win->anim_callback) wl_callback_destroy(win->anim_callback); 114 if (win->anim_callback) wl_callback_destroy(win->anim_callback);
115 win->anim_callback = NULL; 115 win->anim_callback = NULL;
116 116
117 if (win->subsurfs) _ecore_wl_subsurfs_del_all(win);
118
119 if (win->shell_surface) wl_shell_surface_destroy(win->shell_surface); 117 if (win->shell_surface) wl_shell_surface_destroy(win->shell_surface);
120 win->shell_surface = NULL; 118 win->shell_surface = NULL;
121 if (win->surface) wl_surface_destroy(win->surface); 119 if (win->surface) wl_surface_destroy(win->surface);
diff --git a/src/modules/eina/mp/chained_pool/eina_chained_mempool.c b/src/modules/eina/mp/chained_pool/eina_chained_mempool.c
index c0257b1f8f..b71b79dcf4 100644
--- a/src/modules/eina/mp/chained_pool/eina_chained_mempool.c
+++ b/src/modules/eina/mp/chained_pool/eina_chained_mempool.c
@@ -83,7 +83,7 @@ struct _Chained_Mempool
83#ifdef EINA_HAVE_DEBUG_THREADS 83#ifdef EINA_HAVE_DEBUG_THREADS
84 Eina_Thread self; 84 Eina_Thread self;
85#endif 85#endif
86 Eina_Lock mutex; 86 Eina_Spinlock mutex;
87}; 87};
88 88
89typedef struct _Chained_Pool Chained_Pool; 89typedef struct _Chained_Pool Chained_Pool;
@@ -262,7 +262,7 @@ eina_chained_mempool_malloc(void *data, EINA_UNUSED unsigned int size)
262 Chained_Pool *p = NULL; 262 Chained_Pool *p = NULL;
263 void *mem; 263 void *mem;
264 264
265 if (!eina_lock_take(&pool->mutex)) 265 if (!eina_spinlock_take(&pool->mutex))
266 { 266 {
267#ifdef EINA_HAVE_DEBUG_THREADS 267#ifdef EINA_HAVE_DEBUG_THREADS
268 assert(eina_thread_equal(pool->self, eina_thread_self())); 268 assert(eina_thread_equal(pool->self, eina_thread_self()));
@@ -288,7 +288,7 @@ eina_chained_mempool_malloc(void *data, EINA_UNUSED unsigned int size)
288 p = _eina_chained_mp_pool_new(pool); 288 p = _eina_chained_mp_pool_new(pool);
289 if (!p) 289 if (!p)
290 { 290 {
291 eina_lock_release(&pool->mutex); 291 eina_spinlock_release(&pool->mutex);
292 return NULL; 292 return NULL;
293 } 293 }
294 294
@@ -299,7 +299,7 @@ eina_chained_mempool_malloc(void *data, EINA_UNUSED unsigned int size)
299 299
300 mem = _eina_chained_mempool_alloc_in(pool, p); 300 mem = _eina_chained_mempool_alloc_in(pool, p);
301 301
302 eina_lock_release(&pool->mutex); 302 eina_spinlock_release(&pool->mutex);
303 303
304 return mem; 304 return mem;
305} 305}
@@ -312,7 +312,7 @@ eina_chained_mempool_free(void *data, void *ptr)
312 Chained_Pool *p; 312 Chained_Pool *p;
313 313
314 // look 4 pool 314 // look 4 pool
315 if (!eina_lock_take(&pool->mutex)) 315 if (!eina_spinlock_take(&pool->mutex))
316 { 316 {
317#ifdef EINA_HAVE_DEBUG_THREADS 317#ifdef EINA_HAVE_DEBUG_THREADS
318 assert(eina_thread_equal(pool->self, eina_thread_self())); 318 assert(eina_thread_equal(pool->self, eina_thread_self()));
@@ -343,7 +343,7 @@ eina_chained_mempool_free(void *data, void *ptr)
343 } 343 }
344#endif 344#endif
345 345
346 eina_lock_release(&pool->mutex); 346 eina_spinlock_release(&pool->mutex);
347 return; 347 return;
348} 348}
349 349
@@ -357,7 +357,7 @@ eina_chained_mempool_repack(void *data,
357 Chained_Pool *tail; 357 Chained_Pool *tail;
358 358
359 /* FIXME: Improvement - per Chained_Pool lock */ 359 /* FIXME: Improvement - per Chained_Pool lock */
360 if (!eina_lock_take(&pool->mutex)) 360 if (!eina_spinlock_take(&pool->mutex))
361 { 361 {
362#ifdef EINA_HAVE_DEBUG_THREADS 362#ifdef EINA_HAVE_DEBUG_THREADS
363 assert(eina_thread_equal(pool->self, eina_thread_self())); 363 assert(eina_thread_equal(pool->self, eina_thread_self()));
@@ -430,7 +430,7 @@ eina_chained_mempool_repack(void *data,
430 } 430 }
431 431
432 /* FIXME: improvement - reorder pool so that the most used one get in front */ 432 /* FIXME: improvement - reorder pool so that the most used one get in front */
433 eina_lock_release(&pool->mutex); 433 eina_spinlock_release(&pool->mutex);
434} 434}
435 435
436static void * 436static void *
@@ -486,7 +486,7 @@ eina_chained_mempool_init(const char *context,
486 mp->self = eina_thread_self(); 486 mp->self = eina_thread_self();
487#endif 487#endif
488 488
489 eina_lock_new(&mp->mutex); 489 eina_spinlock_new(&mp->mutex);
490 490
491 return mp; 491 return mp;
492} 492}
@@ -524,7 +524,7 @@ eina_chained_mempool_shutdown(void *data)
524 VALGRIND_DESTROY_MEMPOOL(mp); 524 VALGRIND_DESTROY_MEMPOOL(mp);
525#endif 525#endif
526 526
527 eina_lock_free(&mp->mutex); 527 eina_spinlock_free(&mp->mutex);
528 528
529#ifdef EINA_HAVE_DEBUG_THREADS 529#ifdef EINA_HAVE_DEBUG_THREADS
530 assert(eina_thread_equal(mp->self, eina_thread_self())); 530 assert(eina_thread_equal(mp->self, eina_thread_self()));