git.samba.org
/
samba.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "pthreadpool: add pthreadpool_tevent_[current_job_]per_thread_cwd()"
[samba.git]
/
lib
/
pthreadpool
/
pthreadpool_tevent.c
diff --git
a/lib/pthreadpool/pthreadpool_tevent.c
b/lib/pthreadpool/pthreadpool_tevent.c
index b0a757aa1db591dbff2f287dcb1f5af96d03b9a0..5ccff6231f0be0241cfe13b7e331ce8cffca4588 100644
(file)
--- a/
lib/pthreadpool/pthreadpool_tevent.c
+++ b/
lib/pthreadpool/pthreadpool_tevent.c
@@
-211,8
+211,6
@@
struct pthreadpool_tevent_job {
*/
bool signaled;
} needs_fence;
*/
bool signaled;
} needs_fence;
-
- bool per_thread_cwd;
};
static int pthreadpool_tevent_destructor(struct pthreadpool_tevent *pool);
};
static int pthreadpool_tevent_destructor(struct pthreadpool_tevent *pool);
@@
-286,15
+284,6
@@
size_t pthreadpool_tevent_queued_jobs(struct pthreadpool_tevent *pool)
return pthreadpool_queued_jobs(pool->pool);
}
return pthreadpool_queued_jobs(pool->pool);
}
-bool pthreadpool_tevent_per_thread_cwd(struct pthreadpool_tevent *pool)
-{
- if (pool->pool == NULL) {
- return false;
- }
-
- return pthreadpool_per_thread_cwd(pool->pool);
-}
-
static int pthreadpool_tevent_destructor(struct pthreadpool_tevent *pool)
{
struct pthreadpool_tevent_job *job = NULL;
static int pthreadpool_tevent_destructor(struct pthreadpool_tevent *pool)
{
struct pthreadpool_tevent_job *job = NULL;
@@
-713,7
+702,6
@@
struct tevent_req *pthreadpool_tevent_job_send(
return tevent_req_post(req, ev);
}
PTHREAD_TEVENT_JOB_THREAD_FENCE_INIT(job);
return tevent_req_post(req, ev);
}
PTHREAD_TEVENT_JOB_THREAD_FENCE_INIT(job);
- job->per_thread_cwd = pthreadpool_tevent_per_thread_cwd(pool);
talloc_set_destructor(job, pthreadpool_tevent_job_destructor);
DLIST_ADD_END(job->pool->jobs, job);
job->state = state;
talloc_set_destructor(job, pthreadpool_tevent_job_destructor);
DLIST_ADD_END(job->pool->jobs, job);
job->state = state;
@@
-785,20
+773,6
@@
bool pthreadpool_tevent_current_job_continue(void)
return true;
}
return true;
}
-bool pthreadpool_tevent_current_job_per_thread_cwd(void)
-{
- if (current_job == NULL) {
- /*
- * Should only be called from within
- * the job function.
- */
- abort();
- return false;
- }
-
- return current_job->per_thread_cwd;
-}
-
static void pthreadpool_tevent_job_fn(void *private_data)
{
struct pthreadpool_tevent_job *job =
static void pthreadpool_tevent_job_fn(void *private_data)
{
struct pthreadpool_tevent_job *job =