docs: mark Phase 6 complete in phase6-scheduler-integration-plan

This commit is contained in:
Rongsong Shen 2026-04-30 07:17:32 +00:00
parent 9b0e9571d1
commit 177cf45af5
17 changed files with 4226 additions and 361 deletions

View file

@ -145,30 +145,30 @@ char* makeString(char* s)
}
mylock_lock(&(xstring_table.lock));
rc = key_find(xstring_table.xstr_table, (void*)s, (void**)&string);
if (rc > 0) {
/* add reference */
reference(string);
}
mylock_unlock(&(xstring_table.lock));
if (rc > 0) {
mylock_unlock(&(xstring_table.lock));
return (char*)string;
}
/* Cache miss: allocate and insert under the lock so no concurrent caller
* can insert the same key between our find and our add. key_add cannot
* return -EEXIST here because we hold the lock continuously. */
string = makeInstance(&xstring_type, s);
if (string == NULL) {
mylock_unlock(&(xstring_table.lock));
return NULL;
}
mylock_lock(&(xstring_table.lock));
rc = key_add(xstring_table.xstr_table, (void*)s, string);
mylock_unlock(&(xstring_table.lock));
if (rc < 0) {
destroy_(string, (obj_destroy_fn_t)xstring_destroy);
string = NULL;
errno = -rc;
errno = -rc;
return NULL;
}
return (char*)string;