Changeset e507afa in mainline for generic


Ignore:
Timestamp:
2005-11-14T19:39:26Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
abb79e84
Parents:
35667f8
Message:

For now, each architecture must use its own -O switch (-O2 doesn't work for ia64, -O3 doesn't work for mips32).

New mips32 atomic_add() function.

Cleanup.

Location:
generic
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • generic/include/arch.h

    r35667f8 re507afa  
    5353 */
    5454struct the {
    55         int preemption_disabled;        /**< Preemption disabled counter. */
     55        count_t preemption_disabled;    /**< Preemption disabled counter. */
    5656        thread_t *thread;               /**< Current thread. */
    5757        task_t *task;                   /**< Current task. */
  • generic/include/config.h

    r35667f8 re507afa  
    3636#define STACK_SIZE              PAGE_SIZE
    3737
    38 #define CONFIG_MEMORY_SIZE      8*1024*1024
    39 #define CONFIG_HEAP_SIZE        300*1024
     38#define CONFIG_MEMORY_SIZE      (8*1024*1024)
     39#define CONFIG_HEAP_SIZE        (300*1024)
    4040#define CONFIG_STACK_SIZE       STACK_SIZE
    4141
  • generic/include/cpu.h

    r35667f8 re507afa  
    4646        context_t saved_context;
    4747
    48         volatile int nrdy;
     48        volatile count_t nrdy;
    4949        runq_t rq[RQ_COUNT];
    50         volatile int needs_relink;
     50        volatile count_t needs_relink;
    5151
    5252        spinlock_t timeoutlock;
  • generic/include/proc/scheduler.h

    r35667f8 re507afa  
    3939#define NEEDS_RELINK_MAX        (HZ)
    4040
     41/** Scheduler run queue structure. */
    4142struct runq {
    4243        spinlock_t lock;
    4344        link_t rq_head;         /**< List of ready threads. */
    44         int n;                  /**< Number of threads in rq_ready. */
     45        count_t n;              /**< Number of threads in rq_ready. */
    4546};
    4647
     
    5253extern void kcpulb(void *arg);
    5354
     55extern void before_thread_runs(void);
     56
    5457/*
    5558 * To be defined by architectures:
    5659 */
    5760 
    58 extern void before_thread_runs(void);
    5961extern void before_thread_runs_arch(void);
    6062
  • generic/include/synch/rwlock.h

    r35667f8 re507afa  
    4444        spinlock_t lock;
    4545        mutex_t exclusive;      /**< Mutex for writers, readers can bypass it if readers_in is positive. */
    46         int readers_in;         /**< Number of readers in critical section. */
     46        count_t readers_in;     /**< Number of readers in critical section. */
    4747};
    4848
  • generic/include/typedefs.h

    r35667f8 re507afa  
    4040
    4141typedef struct config config_t;
    42 typedef struct cpu_private_data cpu_private_data_t;
    4342typedef struct cpu_info cpu_info_t;
    4443
  • generic/src/proc/scheduler.c

    r35667f8 re507afa  
    5151atomic_t nrdy;
    5252
    53 
    5453/** Take actions before new thread runs
    5554 *
     
    117116 *
    118117 */
    119 static struct thread *find_best_thread(void)
     118static thread_t *find_best_thread(void)
    120119{
    121120        thread_t *t;
Note: See TracChangeset for help on using the changeset viewer.