Enlightenment CVS committal
Author : pfritz
Project : e17
Module : libs/epsilon
Dir : e17/libs/epsilon/src/bin
Modified Files:
epsilon_thumb_test.c epsilon_thumbd.c
Log Message:
*API BREAK* see the discussion in the mailing list. misc and e_modules will
follow
===================================================================
RCS file: /cvs/e/e17/libs/epsilon/src/bin/epsilon_thumb_test.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- epsilon_thumb_test.c 20 Apr 2007 04:02:34 -0000 1.5
+++ epsilon_thumb_test.c 25 Jul 2007 17:00:58 -0000 1.6
@@ -56,7 +56,7 @@
start = ecore_time_get();
- ecore_list_goto_first(files);
+ ecore_list_first_goto(files);
while ((file = ecore_list_next(files))) {
char *realpath;
char fullpath[PATH_MAX];
@@ -80,7 +80,7 @@
sleep(5);
start = ecore_time_get();
- ecore_list_goto_first(files);
+ ecore_list_first_goto(files);
while ((file = ecore_list_next(files))) {
pid_t pid;
char *realpath;
===================================================================
RCS file: /cvs/e/e17/libs/epsilon/src/bin/epsilon_thumbd.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- epsilon_thumbd.c 1 Jul 2007 00:11:48 -0000 1.4
+++ epsilon_thumbd.c 25 Jul 2007 17:00:58 -0000 1.5
@@ -226,7 +226,7 @@
/*
* Search for the disconnecting client
*/
- ecore_list_goto_first(clients);
+ ecore_list_first_goto(clients);
while ((cl = ecore_list_current(clients))) {
if (cl->client == e->client) {
ecore_list_remove(clients);
@@ -264,7 +264,7 @@
/*
* Search for the disconnecting client
*/
- ecore_list_goto_first(workers);
+ ecore_list_first_goto(workers);
while ((cl = ecore_list_current(workers))) {
if (cl->client == e->client) {
ecore_list_remove(workers);
@@ -321,7 +321,7 @@
/*
* Match the client sending the data.
*/
- ecore_list_goto_first(clients);
+ ecore_list_first_goto(clients);
while ((cl = ecore_list_next(clients))) {
if (cl->client == e->client)
break;
@@ -368,7 +368,7 @@
/*
* Match the client data.
*/
- ecore_list_goto_first(workers);
+ ecore_list_first_goto(workers);
while ((cl = ecore_list_next(workers))) {
if (cl->client == e->client)
break;
@@ -409,22 +409,22 @@
/*
* Iterate over the thumbnails splitting them between threads.
*/
- while (ecore_list_nodes(cl->thumbs) > 0) {
- available = ecore_list_nodes(queued_workers);
+ while (ecore_list_count(cl->thumbs) > 0) {
+ available = ecore_list_count(queued_workers);
while ((worker = ecore_list_current(queued_workers))) {
/*
* Don't dispatch work to active workers.
*/
- if (!worker->child &&
!ecore_list_nodes(worker->thumbs)) {
+ if (!worker->child &&
!ecore_list_count(worker->thumbs)) {
Epsilon_Message *msg;
/*
* Get the next message on the queue and break
* out of the inner loop if NULL.
*/
- msg = ecore_list_remove_first(cl->thumbs);
+ msg = ecore_list_first_remove(cl->thumbs);
if (!msg)
break;
@@ -449,7 +449,7 @@
* Only start over in the list if we reached the end.
*/
if (!worker)
- ecore_list_goto_first(queued_workers);
+ ecore_list_first_goto(queued_workers);
if (!available)
break;
@@ -466,14 +466,14 @@
worker = data;
if (debug) printf("Running worker thread %p for %d thumbnails\n",
worker,
- ecore_list_nodes(worker->thumbs));
+ ecore_list_count(worker->thumbs));
/* FIXME: Do we want the fast exit point here?
- if (!ecore_list_nodes(worker->thumbs))
+ if (!ecore_list_count(worker->thumbs))
exit(0);
*/
- while ((msg = ecore_list_remove_first(worker->thumbs))) {
+ while ((msg = ecore_list_first_remove(worker->thumbs))) {
int status = 0;
char *path;
Epsilon *ep;
@@ -531,7 +531,7 @@
/*
* Begin iteration of the thumb list.
*/
- ecore_list_goto_first(worker->thumbs);
+ ecore_list_first_goto(worker->thumbs);
worker->child = fork();
@@ -598,11 +598,11 @@
* Send responses for completed thumbnails
*/
if (debug) printf("Preparing %d responses\n",
- ecore_list_nodes(response_queue));
- while ((response = ecore_list_remove_first(response_queue))) {
+ ecore_list_count(response_queue));
+ while ((response = ecore_list_first_remove(response_queue))) {
Epsilon_Message *msg = response->msg;
- ecore_list_goto_first(clients);
+ ecore_list_first_goto(clients);
while ((cl = ecore_list_next(clients))) {
if (cl->id == msg->nid)
break;
@@ -625,7 +625,7 @@
/*
* Collect completed worker threads.
*/
- ecore_list_goto_first(queued_workers);
+ ecore_list_first_goto(queued_workers);
while ((worker = ecore_list_next(queued_workers))) {
int status = 0;
@@ -655,11 +655,11 @@
* hope of spreading the workload evenly and avoid stalling any one
* particular client longer than others.
*/
- ecore_list_goto_first(clients);
+ ecore_list_first_goto(clients);
while ((cl = ecore_list_next(clients))) {
- int available = ecore_list_nodes(queued_workers);
+ int available = ecore_list_count(queued_workers);
- if (cl->thumbs && ecore_list_nodes(cl->thumbs)) {
+ if (cl->thumbs && ecore_list_count(cl->thumbs)) {
available = epsilond_client_dispatch(cl);
}
@@ -671,15 +671,15 @@
}
- idle = ecore_list_nodes(queued_workers);
+ idle = ecore_list_count(queued_workers);
/*
* Fork off worker threads to begin thumbnailing.
*/
- ecore_list_goto_first(queued_workers);
+ ecore_list_first_goto(queued_workers);
while ((worker = ecore_list_next(queued_workers))) {
if (!worker->child) {
- if (ecore_list_nodes(worker->thumbs)) {
+ if (ecore_list_count(worker->thumbs)) {
idle--;
if (!running_workers)
epsilond_init_thumbd_server(gworkers);
@@ -697,7 +697,7 @@
/*
* FIXME: Detect idle time and exit after a specified interval
*/
- if (idle == ecore_list_nodes(queued_workers)) {
+ if (idle == ecore_list_count(queued_workers)) {
double now = ecore_time_get();
if (!idle_time)
idle_time = now;
@@ -799,7 +799,7 @@
if (cl->thumbs) {
Epsilon_Message *msg;
- while ((msg = ecore_list_remove_first(cl->thumbs))) {
+ while ((msg = ecore_list_first_remove(cl->thumbs))) {
free(msg);
}
ecore_list_destroy(cl->thumbs);
@@ -814,7 +814,7 @@
{
Epsilon_Message *msg;
worker->child = 0;
- while ((msg = ecore_list_remove_first(worker->thumbs)))
+ while ((msg = ecore_list_first_remove(worker->thumbs)))
free(msg);
return 1;
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs