add kiro skills
This commit is contained in:
parent
e5fde7b55f
commit
86fe35e671
53 changed files with 8406 additions and 166 deletions
|
|
@ -470,35 +470,17 @@ static int sched_worker_change(int type, int situation, void* data,
|
|||
|
||||
static int sched_worker_join(int type, int situation, void* data, va_list ap)
|
||||
{
|
||||
/* Unified JOIN signature: (cluster_t*, char* name, worker_t*)
|
||||
* w is NULL for BEFORE_EVENT (worker not yet created). */
|
||||
cluster_t* c = va_arg(ap, cluster_t*);
|
||||
char* name = va_arg(ap, char*);
|
||||
worker_t* w = NULL;
|
||||
int rc;
|
||||
worker_t* w = va_arg(ap, worker_t*);
|
||||
(void)name;
|
||||
|
||||
if (situation == HOOK_BEFORE_EVENT) {
|
||||
/* nothing to do */
|
||||
if (w == NULL)
|
||||
return 0;
|
||||
}
|
||||
|
||||
lock(c->workermgr, RTTI_LOCK_READ);
|
||||
rc = key_find(c->workermgr, (void*)name, (void**)&w);
|
||||
if (w != NULL) {
|
||||
reference(w);
|
||||
}
|
||||
unlock(c->workermgr);
|
||||
if (rc < 0) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (rc == 0) {
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
rc = sched_worker_change(type, situation, data, c, w);
|
||||
|
||||
dereference(w);
|
||||
|
||||
return rc;
|
||||
return sched_worker_change(type, situation, data, c, w);
|
||||
}
|
||||
|
||||
static int sched_worker_dead(int type, int situation, void* data, va_list ap)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue