Skip to content

Commit f163305

Browse files
committed
Fix syscall wrapper naming mismatch
Syscall wrapper implementations used long names while header generated short names via macro, causing link errors when user code called the declared wrappers. Rename implementations to match macro-generated short names, following POSIX conventions for syscall interfaces.
1 parent d3023a6 commit f163305

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

kernel/syscall.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ static int _tadd(void *task, int stack_size)
239239
return mo_task_spawn(task, stack_size);
240240
}
241241

242-
int sys_task_add(void *task, int stack_size)
242+
int sys_tadd(void *task, int stack_size)
243243
{
244244
return syscall(SYS_tadd, task, (void *) stack_size, 0);
245245
}
@@ -252,7 +252,7 @@ static int _tcancel(int id)
252252
return mo_task_cancel(id);
253253
}
254254

255-
int sys_task_cancel(int id)
255+
int sys_tcancel(int id)
256256
{
257257
return syscall(SYS_tcancel, (void *) id, 0, 0);
258258
}
@@ -263,7 +263,7 @@ static int _tyield(void)
263263
return 0;
264264
}
265265

266-
int sys_task_yield(void)
266+
int sys_tyield(void)
267267
{
268268
return syscall(SYS_tyield, 0, 0, 0);
269269
}
@@ -277,7 +277,7 @@ static int _tdelay(int ticks)
277277
return 0;
278278
}
279279

280-
int sys_task_delay(int ticks)
280+
int sys_tdelay(int ticks)
281281
{
282282
return syscall(SYS_tdelay, (void *) ticks, 0, 0);
283283
}
@@ -290,7 +290,7 @@ static int _tsuspend(int id)
290290
return mo_task_suspend(id);
291291
}
292292

293-
int sys_task_suspend(int id)
293+
int sys_tsuspend(int id)
294294
{
295295
return syscall(SYS_tsuspend, (void *) id, 0, 0);
296296
}
@@ -303,7 +303,7 @@ static int _tresume(int id)
303303
return mo_task_resume(id);
304304
}
305305

306-
int sys_task_resume(int id)
306+
int sys_tresume(int id)
307307
{
308308
return syscall(SYS_tresume, (void *) id, 0, 0);
309309
}
@@ -316,7 +316,7 @@ static int _tpriority(int id, int priority)
316316
return mo_task_priority(id, priority);
317317
}
318318

319-
int sys_task_priority(int id, int priority)
319+
int sys_tpriority(int id, int priority)
320320
{
321321
return syscall(SYS_tpriority, (void *) id, (void *) priority, 0);
322322
}
@@ -326,7 +326,7 @@ static int _tid(void)
326326
return mo_task_id();
327327
}
328328

329-
int sys_task_id(void)
329+
int sys_tid(void)
330330
{
331331
return syscall(SYS_tid, 0, 0, 0);
332332
}
@@ -337,7 +337,7 @@ static int _twfi(void)
337337
return 0;
338338
}
339339

340-
int sys_task_wfi(void)
340+
int sys_twfi(void)
341341
{
342342
return syscall(SYS_twfi, 0, 0, 0);
343343
}
@@ -347,7 +347,7 @@ static int _tcount(void)
347347
return mo_task_count();
348348
}
349349

350-
int sys_task_count(void)
350+
int sys_tcount(void)
351351
{
352352
return syscall(SYS_tcount, 0, 0, 0);
353353
}

0 commit comments

Comments
 (0)