Changeset 2ee1ccc in mainline for kernel/generic


Ignore:
Timestamp:
2012-07-01T05:18:27Z (14 years ago)
Author:
Adam Hraska <adam.hraska+hos@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d71331b
Parents:
49e6c6b4
Message:

smp_call: initial unicast version for ia32, amd64.

Location:
kernel/generic
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/adt/list.h

    r49e6c6b4 r2ee1ccc  
    258258}
    259259
     260/** Moves items of one list into another after the specified item.
     261 *
     262 * Inserts all items of @a list after item at @a pos in another list.
     263 * Both lists may be empty.
     264 *
     265 * In order to insert the list at the beginning of another list, use:
     266 * @code
     267 * list_splice(&list_dest.head, &list_src);
     268 * @endcode
     269 *
     270 * @param list Source list to move after pos.
     271 * @param pos Source items will be placed after this item.
     272 */
     273NO_TRACE static inline void list_splice(list_t *list, link_t *pos)
     274{
     275        link_t *pos_next = pos->next;
     276       
     277        if (!list_empty(list)) {
     278                link_t *first = list->head.next;
     279                link_t *last = list->head.prev;
     280
     281                pos->next = first;
     282                first->prev = pos;
     283
     284                last->next = pos_next;
     285                pos_next->prev = last;
     286               
     287                list_initialize(list);
     288        }
     289}
     290
    260291/** Get n-th item in a list.
    261292 *
  • kernel/generic/include/cpu.h

    r49e6c6b4 r2ee1ccc  
    9494       
    9595        /**
     96         * SMP calls to invoke on this CPU.
     97         */
     98        SPINLOCK_DECLARE(smp_calls_lock);
     99        list_t smp_pending_calls;
     100       
     101        /**
    96102         * Stack used by scheduler when there is no running thread.
    97103         */
  • kernel/generic/src/main/main.c

    r49e6c6b4 r2ee1ccc  
    7575#include <synch/waitq.h>
    7676#include <synch/futex.h>
     77#include <smp/smp_call.h>
    7778#include <arch/arch.h>
    7879#include <arch.h>
     
    247248        arch_post_cpu_init();
    248249
     250        smp_call_init();
    249251        clock_counter_init();
    250252        timeout_init();
     
    348350void main_ap_separated_stack(void)
    349351{
     352        smp_call_init();
     353       
    350354        /*
    351355         * Configure timeouts for this cpu.
Note: See TracChangeset for help on using the changeset viewer.