summaryrefslogtreecommitdiff
path: root/nuttx/tools
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-03-06 19:56:32 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-03-06 19:56:32 +0000
commit7c2ea5a1a560284b6d22a60d62ac943ec6144096 (patch)
tree8d1191e3b5fe5cb9f0fe1319d45648d859060cae /nuttx/tools
parent9e9de3d19ebf1890bfccd0bf63fa0209e2ec9359 (diff)
downloadpx4-nuttx-7c2ea5a1a560284b6d22a60d62ac943ec6144096.tar.gz
px4-nuttx-7c2ea5a1a560284b6d22a60d62ac943ec6144096.tar.bz2
px4-nuttx-7c2ea5a1a560284b6d22a60d62ac943ec6144096.zip
Fix some bad syscall dispatching log. This change is not testable until these is a tested NuttX kernel build.
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5713 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/tools')
-rw-r--r--nuttx/tools/mksyscall.c48
1 files changed, 16 insertions, 32 deletions
diff --git a/nuttx/tools/mksyscall.c b/nuttx/tools/mksyscall.c
index 1d172a2a1..c5e15a87b 100644
--- a/nuttx/tools/mksyscall.c
+++ b/nuttx/tools/mksyscall.c
@@ -1,7 +1,7 @@
/****************************************************************************
* tools/mksyscall.c
*
- * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2011-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -433,46 +433,30 @@ static void generate_stub(int nparms)
{
fprintf(stream, "static inline ");
}
- fprintf(stream, "uintptr_t STUB_%s(", g_parm[NAME_INDEX]);
+
+ fprintf(stream, "uintptr_t STUB_%s(int nbr", g_parm[NAME_INDEX]);
- /* Generate the formal parameter list. A function received no parameters is a special case. */
+ /* Generate the formal parameter list */
- if (nparms <= 0)
- {
- fprintf(stream, "void");
- }
- else
+ for (i = 0; i < nparms; i++)
{
- for (i = 0; i < nparms; i++)
- {
- /* Treat the first argument in the list differently from the others..
- * It does not need a comma before it.
- */
-
- if (i > 0)
- {
- /* Check for a variable number of arguments */
+ /* Check for a variable number of arguments */
- if (is_vararg(g_parm[PARM1_INDEX+i], i, nparms))
- {
- /* Always receive six arguments in this case */
+ if (is_vararg(g_parm[PARM1_INDEX+i], i, nparms))
+ {
+ /* Always receive six arguments in this case */
- for (j = i+1; j <= 6; j++)
- {
- fprintf(stream, ", uintptr_t parm%d", j);
- }
- }
- else
- {
- fprintf(stream, ", uintptr_t parm%d", i+1);
- }
- }
- else
+ for (j = i+1; j <= 6; j++)
{
- fprintf(stream, "uintptr_t parm%d", i+1);
+ fprintf(stream, ", uintptr_t parm%d", j);
}
}
+ else
+ {
+ fprintf(stream, ", uintptr_t parm%d", i+1);
+ }
}
+
fprintf(stream, ")\n{\n");
/* Then call the proxied function. Functions that have no return value are