Protect busy VfsObjs during opening and deleting

This commit is contained in:
2025-11-10 20:23:03 +01:00
parent a349154545
commit 7e3b162591
4 changed files with 73 additions and 1 deletions

View File

@ -19,6 +19,7 @@ size_t hal_strspn(const char *s, const char *accept);
char *hal_strcpy(char *dest, const char *src);
char *hal_strchr(const char *s, int c);
char *hal_strstr(const char *str, const char *substring);
char *hal_string_combine(char *dest, const char *src);
void hal_wait(uint32_t ms);
int32_t hal_randnum(void);

View File

@ -140,3 +140,13 @@ char *hal_strstr(const char *str, const char *substring)
return NULL;
}
char *hal_string_combine(char *dest, const char *src) {
size_t i, j;
for(i = 0; dest[i] != '\0'; i++);
for(j = 0; src[j] != '\0'; j++) {
dest[i+j] = src[j];
}
dest[i+j] = '\0';
return dest;
}