Changeset 63e27ef in mainline for kernel/generic/src/ipc


Ignore:
Timestamp:
2017-06-19T21:47:42Z (8 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
deacc58d
Parents:
7354b5e
Message:

ASSERT → assert

Location:
kernel/generic/src/ipc
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/ipc/event.c

    r7354b5e r63e27ef  
    3535 */
    3636
     37#include <assert.h>
    3738#include <ipc/event.h>
    3839#include <mm/slab.h>
     
    5960static event_t *evno2event(int evno, task_t *task)
    6061{
    61         ASSERT(evno < EVENT_TASK_END);
     62        assert(evno < EVENT_TASK_END);
    6263       
    6364        event_t *event;
     
    123124void event_set_unmask_callback(event_type_t evno, event_callback_t callback)
    124125{
    125         ASSERT(evno < EVENT_END);
     126        assert(evno < EVENT_END);
    126127       
    127128        _event_set_unmask_callback(evno2event(evno, NULL), callback);
     
    131132    event_callback_t callback)
    132133{
    133         ASSERT(evno >= (int) EVENT_END);
    134         ASSERT(evno < EVENT_TASK_END);
     134        assert(evno >= (int) EVENT_END);
     135        assert(evno < EVENT_TASK_END);
    135136               
    136137        _event_set_unmask_callback(evno2event(evno, task), callback);
     
    208209    sysarg_t a3, sysarg_t a4, sysarg_t a5)
    209210{
    210         ASSERT(evno < EVENT_END);
     211        assert(evno < EVENT_END);
    211212       
    212213        return event_enqueue(evno2event(evno, NULL), mask, a1, a2, a3, a4, a5);
     
    236237    sysarg_t a1, sysarg_t a2, sysarg_t a3, sysarg_t a4, sysarg_t a5)
    237238{
    238         ASSERT(evno >= (int) EVENT_END);
    239         ASSERT(evno < EVENT_TASK_END);
     239        assert(evno >= (int) EVENT_END);
     240        assert(evno < EVENT_TASK_END);
    240241       
    241242        return event_enqueue(evno2event(evno, task), mask, a1, a2, a3, a4, a5);
  • kernel/generic/src/ipc/ipc.c

    r7354b5e r63e27ef  
    3838 */
    3939
     40#include <assert.h>
    4041#include <synch/spinlock.h>
    4142#include <synch/mutex.h>
     
    5253#include <proc/task.h>
    5354#include <mem.h>
    54 #include <debug.h>
    5555#include <print.h>
    5656#include <console/console.h>
     
    227227                spinlock_lock(&TASK->active_calls_lock);
    228228
    229                 ASSERT(!request->forget);
     229                assert(!request->forget);
    230230
    231231                bool answered = !request->active;
     
    253253                }
    254254        }
    255         ASSERT(!answer || request == answer);
     255        assert(!answer || request == answer);
    256256       
    257257        slab_free(ipc_answerbox_slab, mybox);
     
    631631               
    632632                /* Disconnect phone */
    633                 ASSERT(phone->state == IPC_PHONE_CONNECTED);
     633                assert(phone->state == IPC_PHONE_CONNECTED);
    634634               
    635635                list_remove(&phone->link);
     
    668668static void ipc_forget_call(call_t *call)
    669669{
    670         ASSERT(spinlock_locked(&TASK->active_calls_lock));
    671         ASSERT(spinlock_locked(&call->forget_lock));
     670        assert(spinlock_locked(&TASK->active_calls_lock));
     671        assert(spinlock_locked(&call->forget_lock));
    672672
    673673        /*
     
    789789        call = ipc_wait_for_call(&TASK->answerbox, SYNCH_NO_TIMEOUT,
    790790            SYNCH_FLAGS_NONE);
    791         ASSERT(call->flags & (IPC_CALL_ANSWERED | IPC_CALL_NOTIF));
     791        assert(call->flags & (IPC_CALL_ANSWERED | IPC_CALL_NOTIF));
    792792
    793793        SYSIPC_OP(answer_process, call);
  • kernel/generic/src/ipc/ipcrsc.c

    r7354b5e r63e27ef  
    131131#include <proc/task.h>
    132132#include <ipc/ipcrsc.h>
    133 #include <debug.h>
     133#include <assert.h>
    134134#include <abi/errno.h>
    135135
     
    220220static void phone_deallocp(phone_t *phone)
    221221{
    222         ASSERT(phone->state == IPC_PHONE_CONNECTING);
     222        assert(phone->state == IPC_PHONE_CONNECTING);
    223223       
    224224        /* Atomic operation */
     
    253253        phone_t *phone = &TASK->phones[phoneid];
    254254       
    255         ASSERT(phone->state == IPC_PHONE_CONNECTING);
     255        assert(phone->state == IPC_PHONE_CONNECTING);
    256256        return ipc_phone_connect(phone, box);
    257257}
  • kernel/generic/src/ipc/irq.c

    r7354b5e r63e27ef  
    7272
    7373#include <arch.h>
     74#include <assert.h>
    7475#include <mm/slab.h>
    7576#include <mm/page.h>
     
    399400        irq_spinlock_lock(&box->irq_lock, false);
    400401       
    401         ASSERT(irq->notif_cfg.answerbox == box);
     402        assert(irq->notif_cfg.answerbox == box);
    402403       
    403404        /* Remove the IRQ from the answerbox's list. */
     
    463464                key[1] = irq->devno;
    464465               
    465                 ASSERT(irq->notif_cfg.answerbox == box);
     466                assert(irq->notif_cfg.answerbox == box);
    466467               
    467468                /* Unlist from the answerbox. */
     
    607608void ipc_irq_top_half_handler(irq_t *irq)
    608609{
    609         ASSERT(irq);
    610        
    611         ASSERT(interrupts_disabled());
    612         ASSERT(irq_spinlock_locked(&irq->lock));
     610        assert(irq);
     611       
     612        assert(interrupts_disabled());
     613        assert(irq_spinlock_locked(&irq->lock));
    613614       
    614615        if (irq->notif_cfg.answerbox) {
  • kernel/generic/src/ipc/ops/dataread.c

    r7354b5e r63e27ef  
    3333 */
    3434
     35#include <assert.h>
    3536#include <ipc/sysipc_ops.h>
    3637#include <ipc/ipc.h>
     
    5859static int answer_preprocess(call_t *answer, ipc_data_t *olddata)
    5960{
    60         ASSERT(!answer->buffer);
     61        assert(!answer->buffer);
    6162
    6263        if (!IPC_GET_RETVAL(answer->data)) {
  • kernel/generic/src/ipc/ops/datawrite.c

    r7354b5e r63e27ef  
    3333 */
    3434
     35#include <assert.h>
    3536#include <ipc/sysipc_ops.h>
    3637#include <ipc/ipc.h>
     
    7071static int answer_preprocess(call_t *answer, ipc_data_t *olddata)
    7172{
    72         ASSERT(answer->buffer);
     73        assert(answer->buffer);
    7374
    7475        if (!IPC_GET_RETVAL(answer->data)) {
  • kernel/generic/src/ipc/sysipc.c

    r7354b5e r63e27ef  
    3434
    3535#include <arch.h>
     36#include <assert.h>
    3637#include <errno.h>
    3738#include <mem.h>
     
    174175                return rc;
    175176        } else {
    176                 ASSERT(answer->active);
     177                assert(answer->active);
    177178
    178179                /*
     
    313314                                 * We are no longer expected to free it.
    314315                                 */
    315                                 ASSERT(rc == EINTR);
     316                                assert(rc == EINTR);
    316317                        }
    317318                        return rc;     
Note: See TracChangeset for help on using the changeset viewer.