Changeset b7fd2a0 in mainline for uspace/app/taskdump/fibrildump.c


Ignore:
Timestamp:
2018-01-13T03:10:29Z (7 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a53ed3a
Parents:
36f0738
Message:

Use errno_t in all uspace and kernel code.

Change type of every variable, parameter and return value that holds an
<errno.h> constant to either errno_t (the usual case), or sys_errno_t
(some places in kernel). This is for the purpose of self-documentation,
as well as for type-checking with a bit of type definition hackery.

Although this is a massive commit, it is a simple text replacement, and thus
is very easy to verify. Simply do the following:

`
git checkout <this commit's hash>
git reset HEAD
git add .
tools/srepl '\berrno_t\b' int
git add .
tools/srepl '\bsys_errno_t\b' sysarg_t
git reset
git diff
`

While this doesn't ensure that the replacements are correct, it does ensure
that the commit doesn't do anything except those replacements. Since errno_t
is typedef'd to int in the usual case (and sys_errno_t to sysarg_t), even if
incorrect, this commit cannot change behavior.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/taskdump/fibrildump.c

    r36f0738 rb7fd2a0  
    4343#include <udebug.h>
    4444
    45 static int fibrildump_read_uintptr(void *, uintptr_t, uintptr_t *);
     45static errno_t fibrildump_read_uintptr(void *, uintptr_t, uintptr_t *);
    4646
    4747static stacktrace_ops_t fibrildump_st_ops = {
     
    4949};
    5050
    51 static int fibrildump_read_uintptr(void *arg, uintptr_t addr, uintptr_t *data)
     51static errno_t fibrildump_read_uintptr(void *arg, uintptr_t addr, uintptr_t *data)
    5252{
    5353        async_sess_t *sess = (async_sess_t *)arg;
     
    5656}
    5757
    58 static int read_link(async_sess_t *sess, uintptr_t addr, link_t *link)
     58static errno_t read_link(async_sess_t *sess, uintptr_t addr, link_t *link)
    5959{
    60         int rc;
     60        errno_t rc;
    6161
    6262        rc = udebug_mem_read(sess, (void *)link, addr, sizeof(link_t));
     
    6464}
    6565
    66 static int read_fibril(async_sess_t *sess, uintptr_t addr, fibril_t *fibril)
     66static errno_t read_fibril(async_sess_t *sess, uintptr_t addr, fibril_t *fibril)
    6767{
    68         int rc;
     68        errno_t rc;
    6969
    7070        rc = udebug_mem_read(sess, (void *)fibril, addr, sizeof(fibril_t));
     
    7272}
    7373
    74 int fibrils_dump(symtab_t *symtab, async_sess_t *sess)
     74errno_t fibrils_dump(symtab_t *symtab, async_sess_t *sess)
    7575{
    7676        uintptr_t fibril_list_addr;
     
    7979        uintptr_t addr, fibril_addr;
    8080        uintptr_t pc, fp;
    81         int rc;
     81        errno_t rc;
    8282
    8383        /*
Note: See TracChangeset for help on using the changeset viewer.