profile/ivi/ecore.git
13 years agoecore_con client example
discomfitor [Mon, 20 Sep 2010 21:16:51 +0000 (21:16 +0000)]
ecore_con client example

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52517 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoecore_con server example
discomfitor [Mon, 20 Sep 2010 21:13:29 +0000 (21:13 +0000)]
ecore_con server example

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52516 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoupdate doxyfile to warn more for missing params, prevent __UNUSED__ warnings, exclude...
discomfitor [Mon, 20 Sep 2010 21:13:05 +0000 (21:13 +0000)]
update doxyfile to warn more for missing params, prevent __UNUSED__ warnings, exclude all ecore_config

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52515 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoremove ecore_config stuff; also accidentally committed undocumented changes in r52512...
discomfitor [Mon, 20 Sep 2010 21:12:08 +0000 (21:12 +0000)]
remove ecore_config stuff; also accidentally committed undocumented changes in r52512 as follows:
*update Doxyfile to new version
*fix doxygen warnings from samsung <tbd> email
*remove references to code that was probably last used by the roman empire

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52514 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoThis is the Doxygen Police! If you committed any of these lines, accept your public...
discomfitor [Mon, 20 Sep 2010 20:52:15 +0000 (20:52 +0000)]
This is the Doxygen Police! If you committed any of these lines, accept your public shaming!

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52513 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agodoxy error fixes
discomfitor [Mon, 20 Sep 2010 20:33:50 +0000 (20:33 +0000)]
doxy error fixes

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52512 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoT_UNIX I AM GUESSING THIS WAS YOU!
discomfitor [Mon, 20 Sep 2010 20:18:26 +0000 (20:18 +0000)]
T_UNIX I AM GUESSING THIS WAS YOU!
@Brief != @brief!!!

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52510 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agodoxy todo--
discomfitor [Mon, 20 Sep 2010 20:12:17 +0000 (20:12 +0000)]
doxy todo--

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52509 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoauthors updates
discomfitor [Mon, 20 Sep 2010 20:04:05 +0000 (20:04 +0000)]
authors updates

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52507 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agofix obscure error case where CLIENT_DEL event is not generated after a client ssl...
discomfitor [Mon, 20 Sep 2010 19:32:37 +0000 (19:32 +0000)]
fix obscure error case where CLIENT_DEL event is not generated after a client ssl pings ecore's server and disconnects immediately after handshake

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52504 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoadd cl->client_count member to prevent segv when counting a list that is actually...
discomfitor [Mon, 20 Sep 2010 19:31:11 +0000 (19:31 +0000)]
add cl->client_count member to prevent segv when counting a list that is actually null but hasn't been nulled

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52503 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoformatting, switch lost_client to bool
discomfitor [Mon, 20 Sep 2010 18:52:52 +0000 (18:52 +0000)]
formatting, switch lost_client to bool

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52501 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoFINALLY FIX OPENSSL SERVER!!!!!!!!! YESSSSSSSSSSSSSSSSSSSSS
discomfitor [Mon, 20 Sep 2010 18:25:21 +0000 (18:25 +0000)]
FINALLY FIX OPENSSL SERVER!!!!!!!!! YESSSSSSSSSSSSSSSSSSSSS

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52497 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoFix typos
lucas [Mon, 20 Sep 2010 17:09:13 +0000 (17:09 +0000)]
Fix typos

"he->the" where appropriate

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52493 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agofix unused warns
discomfitor [Sun, 19 Sep 2010 19:41:06 +0000 (19:41 +0000)]
fix unused warns

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52470 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoremove ssl2 support completely
discomfitor [Sun, 19 Sep 2010 19:38:38 +0000 (19:38 +0000)]
remove ssl2 support completely

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52469 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agognutls cleanup: only create diffie hellman bits on server init instead of for each...
discomfitor [Sun, 19 Sep 2010 19:25:47 +0000 (19:25 +0000)]
gnutls cleanup: only create diffie hellman bits on server init instead of for each client

overhead/blocking--
speed++

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52468 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agofinally crush the last openssl segv
discomfitor [Sun, 19 Sep 2010 18:40:43 +0000 (18:40 +0000)]
finally crush the last openssl segv
still broken though

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52467 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agomore warngins--
raster [Sun, 19 Sep 2010 03:55:06 +0000 (03:55 +0000)]
more warngins--

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52460 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agowarnings--
raster [Sun, 19 Sep 2010 03:51:56 +0000 (03:51 +0000)]
warnings--

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52459 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agowarning--
raster [Sun, 19 Sep 2010 03:44:42 +0000 (03:44 +0000)]
warning--

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52458 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agowarning--
raster [Sun, 19 Sep 2010 03:29:30 +0000 (03:29 +0000)]
warning--

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52457 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agowarning--
raster [Sun, 19 Sep 2010 03:28:18 +0000 (03:28 +0000)]
warning--

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52456 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agofmting.
raster [Sun, 19 Sep 2010 03:26:59 +0000 (03:26 +0000)]
fmting.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52455 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agowarnings--
raster [Sun, 19 Sep 2010 03:25:15 +0000 (03:25 +0000)]
warnings--

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52454 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agowarning--
raster [Sun, 19 Sep 2010 03:09:09 +0000 (03:09 +0000)]
warning--

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52453 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agocheck return of ssl_server_prepare
discomfitor [Sat, 18 Sep 2010 19:29:43 +0000 (19:29 +0000)]
check return of ssl_server_prepare

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52423 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agogiant cleanups/rewrites which are unnoticeable to users:
discomfitor [Sat, 18 Sep 2010 19:26:05 +0000 (19:26 +0000)]
giant cleanups/rewrites which are unnoticeable to users:
*client->server renamed client->host_server to clarify ambiguity
*ecore_con_ssl_client_prepare.* killed off because it was useless and wrong
*openssl generates only one SSL_CTX per server now instead of a new one for each client, which is broken/unnecessary/wasteful
**as a result, certificate loading is now only done once
**additionally this will save a very large amount of memory and avoid unnecessary/broken refcounting
*ecore_con_ssl_server_prepare.* rewritten to actually be useful instead of just a lazy way to null pointers
**all SSL_CTX code now goes here^
*some formatting fixes
*internal function renames

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52422 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoadd the possibility to have shaped windows in ecore_evas (gdi
caro [Sat, 18 Sep 2010 17:24:31 +0000 (17:24 +0000)]
add the possibility to have shaped windows in ecore_evas (gdi
only for now)

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52418 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agodont use tls max if it doesnt exist eh?
raster [Sat, 18 Sep 2010 11:41:15 +0000 (11:41 +0000)]
dont use tls max if it doesnt exist eh?

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52413 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoadd mixed protocol for gnutls as well
discomfitor [Sat, 18 Sep 2010 08:46:17 +0000 (08:46 +0000)]
add mixed protocol for gnutls as well

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52412 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoallow mixing sslv3+tlsv1 in openssl, FINALLY FIX INITIAL BUG FOR OPENSSL SERVERS!
discomfitor [Sat, 18 Sep 2010 08:36:13 +0000 (08:36 +0000)]
allow mixing sslv3+tlsv1 in openssl, FINALLY FIX INITIAL BUG FOR OPENSSL SERVERS!
note that openssl servers still do not work because there is more than one bug :/

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52411 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoswitch private struct members from char bitfields to Eina_Bool bitfields
discomfitor [Sat, 18 Sep 2010 06:30:13 +0000 (06:30 +0000)]
switch private struct members from char bitfields to Eina_Bool bitfields
no noticeable difference

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52399 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoa loooooooot of outdents and reformatting
discomfitor [Sat, 18 Sep 2010 06:06:05 +0000 (06:06 +0000)]
a loooooooot of outdents and reformatting

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52397 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agowhoops forgot an UNUSED for openssl
discomfitor [Sat, 18 Sep 2010 05:32:27 +0000 (05:32 +0000)]
whoops forgot an UNUSED for openssl

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52396 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agomore progress on fixing openssl servers, fix all warnings, add error checking for...
discomfitor [Sat, 18 Sep 2010 05:31:00 +0000 (05:31 +0000)]
more progress on fixing openssl servers, fix all warnings, add error checking for openssl code

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52395 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agostop the indenting and line wrapping madness!!!!!!!
discomfitor [Sat, 18 Sep 2010 05:30:16 +0000 (05:30 +0000)]
stop the indenting and line wrapping madness!!!!!!!

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52394 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agooutdent for readability
discomfitor [Sat, 18 Sep 2010 04:59:11 +0000 (04:59 +0000)]
outdent for readability

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52393 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoadd rest of ssl algorithms and clean up
discomfitor [Sat, 18 Sep 2010 01:27:38 +0000 (01:27 +0000)]
add rest of ssl algorithms and clean up

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52391 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoformatting
discomfitor [Sat, 18 Sep 2010 01:20:25 +0000 (01:20 +0000)]
formatting

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52390 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agofix gnutls ssl
discomfitor [Fri, 17 Sep 2010 19:43:03 +0000 (19:43 +0000)]
fix gnutls ssl

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52385 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agonew ssl error output: now with detailed location info and 50% more fiber!
discomfitor [Fri, 17 Sep 2010 17:39:32 +0000 (17:39 +0000)]
new ssl error output: now with detailed location info and 50% more fiber!

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52380 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agosimplify error conditions and output errrors on failure
discomfitor [Fri, 17 Sep 2010 17:22:59 +0000 (17:22 +0000)]
simplify error conditions and output errrors on failure

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52378 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoenable compression for gnutls, add error checks to client functions
discomfitor [Fri, 17 Sep 2010 17:18:41 +0000 (17:18 +0000)]
enable compression for gnutls, add error checks to client functions

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52377 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoadd error checking for servers
discomfitor [Fri, 17 Sep 2010 17:03:15 +0000 (17:03 +0000)]
add error checking for servers

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52376 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agouse right pointer for ssl ctx to avoid segv
discomfitor [Fri, 17 Sep 2010 08:58:23 +0000 (08:58 +0000)]
use right pointer for ssl ctx to avoid segv

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52362 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agofix ssl to work with cert loading flag
discomfitor [Fri, 17 Sep 2010 08:00:42 +0000 (08:00 +0000)]
fix ssl to work with cert loading flag

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52361 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agocheck returned value of evas_engine_info_set()
caro [Fri, 17 Sep 2010 06:14:08 +0000 (06:14 +0000)]
check returned value of evas_engine_info_set()

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52360 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agowarning--
caro [Wed, 15 Sep 2010 08:41:41 +0000 (08:41 +0000)]
warning--

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52292 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoAdd missing bogosity X cursor
bdilly [Tue, 14 Sep 2010 21:43:44 +0000 (21:43 +0000)]
Add missing bogosity X cursor

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52270 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoecore_win32 does not depend on Evas.
caro [Tue, 14 Sep 2010 21:25:31 +0000 (21:25 +0000)]
ecore_win32 does not depend on Evas.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52264 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agouseless define (already defined in command line)
caro [Tue, 14 Sep 2010 16:47:01 +0000 (16:47 +0000)]
useless define (already defined in command line)

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52247 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoepoll - bad. disable default support. u have to --enable it. don't
raster [Tue, 14 Sep 2010 10:38:28 +0000 (10:38 +0000)]
epoll - bad. disable default support. u have to --enable it. don't
--enable it if u want elm quicklaunch to work.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52240 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agobetter cleanup of poll fd's on shutdown
raster [Tue, 14 Sep 2010 00:53:57 +0000 (00:53 +0000)]
better cleanup of poll fd's on shutdown

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52229 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agofix first map bug handling to handle more than first window map.
raster [Mon, 13 Sep 2010 22:16:26 +0000 (22:16 +0000)]
fix first map bug handling to handle more than first window map.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52200 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoAdd a semicolon. GCC: This ones for you.
nash [Mon, 13 Sep 2010 09:16:01 +0000 (09:16 +0000)]
Add a semicolon.  GCC: This ones for you.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52184 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoDeniggle and rename the exore_x_dndn_callback_pos_update_set call.
nash [Mon, 13 Sep 2010 09:15:57 +0000 (09:15 +0000)]
Deniggle and rename the exore_x_dndn_callback_pos_update_set call.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52183 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoUse -1.
nash [Mon, 13 Sep 2010 09:15:53 +0000 (09:15 +0000)]
Use -1.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52182 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoXdnd callback (API Addition): Rationale below.
nash [Mon, 13 Sep 2010 09:15:50 +0000 (09:15 +0000)]
Xdnd callback (API Addition): Rationale below.

Essentially the problem is this: For drag and drop Ecore currently handles the
position update calls.  But usually the application wants to display some user
feedback - a window to display the drag selection for instance.

Now the way e17 does it is grab the mouse cursor movements and track them
itself.  However ecore is already doing this, it's already walking window
trees, calculating real positions, _and_ sending them in an X client message.
So it seems rather silly to duplicate the code in the user app to get the same
info.

We could possibly have added a new event, but then we need to deal the fact
the position update may arrive _After_ the item has been dropped.  Hilarity
ensures[1].

This callback is meant for purely the selection owner of the drag to use, so
it is a callback set, not an add.

[1] Segfaults probably.  Nothing funnier.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52181 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoAlways return an x rander version (unset in this case).
nash [Mon, 13 Sep 2010 09:15:45 +0000 (09:15 +0000)]
Always return an x rander version (unset in this case).

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52180 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agodo extra composite checks - need to do the lot to be useful.
raster [Fri, 10 Sep 2010 06:57:21 +0000 (06:57 +0000)]
do extra composite checks - need to do the lot to be useful.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52121 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoFix priority dropping
lucas [Thu, 9 Sep 2010 11:48:31 +0000 (11:48 +0000)]
Fix priority dropping

Lowering priority was wrong. Some bugs:

1) You don't lower the priority by setting the scheduler policy to some
   of the real-time ones (SCHED_RR or SCHER_FIFO). If you do so, you are
   actually increasing the priority of the workers and your main thread
   you be preempted and stalled until the workers complete their job.
   Fortunately this will only happen if your programming is running as
   root, as normal users (without CAP_SYS_NICE) are unable to set
   priority to real-time values.

2) setpriority() and getpriority() are not part of pthread and you can't
   use the id returned by pthread. Manpage explicitly says so on
   pthread_self(3):
   "The  thread ID returned by pthread_self() is not the same thing as the
       kernel thread ID returned by a call to gettid(2)."

   Since glibc does not have a gettid, here we are using
   syscall(SYS_gettid)

This patch was tested with the program below. Compile and run:
   $ gcc p_hello2.c -o p_hello2 -lpthread
   $ ./p_hello2 10

You'll see that the main thread remains with its priority and threads
created by the main thread change their own niceness.

#include <errno.h>
#include <pthread.h>
#include <sched.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/resource.h>
#include <sys/syscall.h>
#include <sys/time.h>
#include <sys/types.h>

/* Lower priority of current thread.
 *
 * It's used by worker threads so they use up "bg cpu" as it was really intended
 * to work. If current thread is running with real-time priority, we decrease
 * our priority by 5. This is done in a portable way.  Otherwise we are
 * running with SCHED_OTHER policy and there's no portable way to set the nice
 * level on current thread. In Linux, it does work and it's the only one that is
 * implemented.
 */
static void
_ecore_thread_pri_drop(void)
{
   struct sched_param param;
   int pol, prio, ret;
   pid_t tid;
   pthread_t pthread_id;

   pthread_id = pthread_self();
   ret = pthread_getschedparam(pthread_id, &pol, &param);
   if (ret)
     {
        fprintf(stderr, "Unable to query sched parameters\n");
        return;
     }

   if (pol == SCHED_RR || pol == SCHED_FIFO)
     {
        prio = sched_get_priority_max(pol);
        param.sched_priority += 5;
        if (prio > 0 && param.sched_priority > prio)
           param.sched_priority = prio;

        pthread_setschedparam(pthread_id, pol, &param);
     }
#ifdef __linux__
   else
     {
        tid = syscall(SYS_gettid);
        errno = 0;
        prio = getpriority(PRIO_PROCESS, tid);
        if (errno == 0)
          {
             prio += 5;
             if (prio > 19)
                prio = 19;

             setpriority(PRIO_PROCESS, tid, prio);
          }
     }
 #endif
}

/*
 * p_hello.c -- a hello program (in pthread)
 */
#define MAX_THREAD 1000

typedef struct {
    int id;
} parm;

void *hello(void *arg)
{
    parm *p=(parm *)arg;
    pid_t tid;
    int prio;
    tid =  syscall(SYS_gettid);
    printf("[%d] Hello from node %d\n", tid, p->id);
    pthread_yield();

    printf("[%d] tid=%lu\n", tid);

    _ecore_thread_pri_drop();

    prio = getpriority(PRIO_PROCESS, tid);
    printf("[%d] New nice value: %d\n", tid, prio);
    return (NULL);
}

void main(int argc, char* argv[]) {
    int n,i;
    pthread_t *threads;
    pthread_attr_t pthread_custom_attr;
    parm *p;

    pid_t tid;
    int prio;

    if (argc != 2)
    {
        printf ("Usage: %s n\n  where n is no. of threads\n",argv[0]);
        exit(1);
    }

    n=atoi(argv[1]);

    if ((n < 1) || (n > MAX_THREAD)) {
        printf ("The no of thread should between 1 and %d.\n",MAX_THREAD);
        exit(1);
    }

    threads = (pthread_t *)malloc(n * sizeof(*threads));
    pthread_attr_init(&pthread_custom_attr);

    p = (parm *)malloc(n * sizeof(parm));
    /* Start up thread */

    tid = syscall(SYS_gettid);
    for (i=0; i<n; i++) {
        prio = getpriority(PRIO_PROCESS, tid);
        printf("[%d] root thread nice value: %d\n", tid, prio);

        p[i].id=i;
        pthread_create(&threads[i], &pthread_custom_attr, hello, (void *)(p+i));
    }

    /* Synchronize the completion of each thread. */

    for (i=0; i<n; i++) {
        pthread_join(threads[i],NULL);
    }
    free(p);
}

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@52039 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoFix common misspellings
lucas [Wed, 8 Sep 2010 11:23:42 +0000 (11:23 +0000)]
Fix common misspellings

Following misspellings were fixed:

alledgedly->allegedly
cant->can't
carefull->careful
consistant->consistent
currenly->currently
dependancy->dependency
descripters->descriptors
doesnt->doesn't
dosen't->doesn't
existant->existent
exmaple->example
inbetween->between
independant->independent
isnt->isn't
mroe->more
neccessary->necessary
occured->occurred
occurence->occurrence
parrallel->parallel
particualr->particular
preceeding->preceding
recieved->received
recieves->receives
seperate->separate
substraction->subtraction
succesfully->successfully
successfull->successful
sucess->success
supress->suppress
usefull->useful
witht->with

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51986 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agosvn:ignore
barbieri [Tue, 7 Sep 2010 15:39:51 +0000 (15:39 +0000)]
svn:ignore

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51953 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoMerge branch 'elmdnd'
nash [Tue, 7 Sep 2010 06:56:16 +0000 (06:56 +0000)]
Merge branch 'elmdnd'

Conflicts:
trunk/TMP/st/elementary/.gitignore

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51935 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years ago * ecore: fix error detection of ecore_pipe_add.
cedric [Mon, 6 Sep 2010 16:36:44 +0000 (16:36 +0000)]
* ecore: fix error detection of ecore_pipe_add.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51926 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoPrototypes for the missing ecore_x convert functions.
devilhorns [Sun, 5 Sep 2010 15:40:36 +0000 (15:40 +0000)]
Prototypes for the missing ecore_x convert functions.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51906 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agomake 1 func to set lower pri - fall back to setpriority on linux and
raster [Sat, 4 Sep 2010 14:32:50 +0000 (14:32 +0000)]
make 1 func to set lower pri - fall back to setpriority on linux and
try it there only.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51885 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agosame - back to RR.
raster [Sat, 4 Sep 2010 05:40:38 +0000 (05:40 +0000)]
same - back to RR.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51878 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agorr->other
raster [Sat, 4 Sep 2010 00:54:53 +0000 (00:54 +0000)]
rr->other

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51873 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years ago * ecore: ecore_thread are not here to bring your computer down, so
cedric [Fri, 3 Sep 2010 13:39:53 +0000 (13:39 +0000)]
* ecore: ecore_thread are not here to bring your computer down, so
reduce their priority too.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51862 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agofix include order for Windows
caro [Mon, 30 Aug 2010 05:49:18 +0000 (05:49 +0000)]
fix include order for Windows

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51740 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoleak--
raster [Sat, 28 Aug 2010 15:07:45 +0000 (15:07 +0000)]
leak--

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51702 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agomore leak--
raster [Sat, 28 Aug 2010 14:56:14 +0000 (14:56 +0000)]
more leak--

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51701 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agofix leak of fb fd in error event.
raster [Sat, 28 Aug 2010 14:51:56 +0000 (14:51 +0000)]
fix leak of fb fd in error event.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51700 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agodoxy clarification
discomfitor [Sat, 28 Aug 2010 10:01:20 +0000 (10:01 +0000)]
doxy clarification

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51694 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agotechnically xerrorhandlers have a return of an int - but its ignored
raster [Sat, 28 Aug 2010 04:28:15 +0000 (04:28 +0000)]
technically xerrorhandlers have a return of an int - but its ignored
by xlib (explicitly in docs).

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51693 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoAdd the following functions to Ecore_Con API:
mekius [Fri, 27 Aug 2010 05:16:00 +0000 (05:16 +0000)]
Add the following functions to Ecore_Con API:

ecore_con_server_name_get
ecore_con_server_port_get

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51670 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agofix copy/paste
caro [Thu, 26 Aug 2010 22:39:42 +0000 (22:39 +0000)]
fix copy/paste

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51667 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoApply double_condition_check.cocci
lucas [Thu, 26 Aug 2010 20:45:09 +0000 (20:45 +0000)]
Apply double_condition_check.cocci

The offending projects were:

 E16/e/src/backgrounds.c                 |   10 ++++------
 PROTO/eon/src/lib/layout/eon_stack.c    |    4 +---
 ecore/src/lib/ecore_win32/ecore_win32.c |    3 +--
 ecore/src/lib/ecore_wince/ecore_wince.c |    3 +--
 edje/src/lib/edje_edit.c                |    3 +--
 evas/src/lib/cache/evas_cache_image.c   |    2 +-
 exalt/src/lib/libexalt_private.c        |    2 +-

This patch assumes code in these places were insane and the fix is to remove
one condition check. Most likely this is not true, but there's no automatic fix
for that.

Looking at the patch, it seems that some places should use "x" and "y" vars but
used just one of them and therefore they were caught by coccinelle.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51666 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoRevert and re-apply badnull patch
lucas [Thu, 26 Aug 2010 01:34:13 +0000 (01:34 +0000)]
Revert and re-apply badnull patch

Revert previous patch generated by badnull.cocci script, and apply the new one.
The main difference is that assert and assert-like functions are not touched
anymore.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51650 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agofix ecore_thread to use pthread correctly. should build on windows now
raster [Wed, 25 Aug 2010 00:26:01 +0000 (00:26 +0000)]
fix ecore_thread to use pthread correctly. should build on windows now
too.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51621 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoAdd UNUSED where missing.
devilhorns [Tue, 24 Aug 2010 23:29:24 +0000 (23:29 +0000)]
Add UNUSED where missing.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51618 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agofix sync issue in 1 special event re-order case. booo!
raster [Tue, 24 Aug 2010 09:26:34 +0000 (09:26 +0000)]
fix sync issue in 1 special event re-order case. booo!

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51609 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoRemove the possibility to build ecore_config (which was deprecated anyway).
caro [Tue, 24 Aug 2010 06:37:37 +0000 (06:37 +0000)]
Remove the possibility to build ecore_config (which was deprecated anyway).
It will be raised from dead later, with a better API/code

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51599 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years ago * ecore: struct a b = { 0 }; doesn't mean memset.
cedric [Mon, 23 Aug 2010 13:05:57 +0000 (13:05 +0000)]
* ecore: struct a b = { 0 }; doesn't mean memset.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51571 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoget the verbosity with the env variable CK_VERBOSITY. By default, nothing is changed.
caro [Sun, 22 Aug 2010 17:53:01 +0000 (17:53 +0000)]
get the verbosity with the env variable CK_VERBOSITY. By default, nothing is changed.
Values for CK_VERBOSITY:
silent
minimal
normal (the default)
verbose

Ex. of use:

CK_VERBOSITY=verbose make check

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51534 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoseparate the Ecore_X test from the Ecore one
caro [Sun, 22 Aug 2010 17:38:51 +0000 (17:38 +0000)]
separate the Ecore_X test from the Ecore one

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51533 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years ago * add more checks
caro [Sun, 22 Aug 2010 17:14:05 +0000 (17:14 +0000)]
 * add more checks
 * add comments about strange code

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51525 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoConvert (hopefully) all comparisons to NULL
lucas [Sat, 21 Aug 2010 13:52:25 +0000 (13:52 +0000)]
Convert (hopefully) all comparisons to NULL

Apply badzero.cocci, badnull.coci and badnull2.cocci

This should convert all cases where there's a comparison to NULL to simpler
forms. This patch applies the following transformations:

code before patch               ||code after patch
===============================================================

return a == NULL;                 return !a;

return a != NULL;                 return !!a;

func(a == NULL);                  func(!a);

func(a != NULL);                  func(!!a);

b = a == NULL;                    b = !a;

b = a != NULL;                    b = !!a;

b = a == NULL ? c : d;            b = !a ? c : d;

b = a != NULL ? c : d;            b = a ? c : d;

other cases:

a == NULL                         !a
a != NULL                         a

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51487 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agofix randr bug! -> tunix!
raster [Sat, 21 Aug 2010 02:37:20 +0000 (02:37 +0000)]
fix randr bug! -> tunix!

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51475 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoagain - pass distcheck!
raster [Fri, 20 Aug 2010 02:48:54 +0000 (02:48 +0000)]
again - pass distcheck!

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51459 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoRemove blank line & fix formatting of function params.
devilhorns [Thu, 19 Aug 2010 14:41:24 +0000 (14:41 +0000)]
Remove blank line & fix formatting of function params.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51397 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoAdd missing UNUSED.
devilhorns [Thu, 19 Aug 2010 14:33:49 +0000 (14:33 +0000)]
Add missing UNUSED.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51396 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoHandle missing case of POLICY_NONE.
devilhorns [Thu, 19 Aug 2010 14:32:16 +0000 (14:32 +0000)]
Handle missing case of POLICY_NONE.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51395 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoAdd some missing UNUSED macros.
devilhorns [Thu, 19 Aug 2010 14:29:05 +0000 (14:29 +0000)]
Add some missing UNUSED macros.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51394 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years ago * ecore: add some information about Ecore_Thread.
cedric [Thu, 19 Aug 2010 08:57:55 +0000 (08:57 +0000)]
* ecore: add some information about Ecore_Thread.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51389 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agofrom t_unix <- add none enum for randr
raster [Thu, 19 Aug 2010 08:25:34 +0000 (08:25 +0000)]
from t_unix <- add none enum for randr

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51387 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoFix inline functions
englebass [Wed, 18 Aug 2010 21:27:40 +0000 (21:27 +0000)]
Fix inline functions

Inline functions which are to be used in serveral files must be
completly written in the .x file.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51361 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

13 years agoFix 'suggest braces around empty body if statement'.
devilhorns [Wed, 18 Aug 2010 16:28:36 +0000 (16:28 +0000)]
Fix 'suggest braces around empty body if statement'.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@51291 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33