Changeset 31d8e10 in mainline for kernel/generic/src/ipc/ipc.c


Ignore:
Timestamp:
2007-04-05T16:09:49Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
547fa39
Parents:
879585a3
Message:

Continue to de-oversynchronize the kernel.

  • replace as→refcount with an atomic counter; accesses to this

reference counter are not to be done when the as→lock mutex is held;
this gets us rid of mutex_lock_active();

Remove the possibility of a deadlock between TLB shootdown and asidlock.

  • get rid of mutex_lock_active() on as→lock
  • when locking the asidlock spinlock, always do it conditionally and with

preemption disabled; in the unsuccessful case, enable interrupts and try again

  • there should be no deadlock between TLB shootdown and the as→lock mutexes
  • PLEASE REVIEW !!!

Add DEADLOCK_PROBE's to places where we have spinlock_trylock() loops.

File:
1 edited

Legend:

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

    r879585a3 r31d8e10  
    375375        call_t *call;
    376376        phone_t *phone;
     377        DEADLOCK_PROBE_INIT(p_phonelck);
    377378
    378379        /* Disconnect all our phones ('ipc_phone_hangup') */
     
    388389        while (!list_empty(&TASK->answerbox.connected_phones)) {
    389390                phone = list_get_instance(TASK->answerbox.connected_phones.next,
    390                                           phone_t, link);
     391                    phone_t, link);
    391392                if (! spinlock_trylock(&phone->lock)) {
    392393                        spinlock_unlock(&TASK->answerbox.lock);
     394                        DEADLOCK_PROBE(p_phonelck, DEADLOCK_THRESHOLD);
    393395                        goto restart_phones;
    394396                }
Note: See TracChangeset for help on using the changeset viewer.