aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main/java/android/support/v4
diff options
context:
space:
mode:
authorVincent Breitmoser <valodim@mugenguild.com>2014-07-26 22:15:49 +0200
committerVincent Breitmoser <valodim@mugenguild.com>2014-07-26 22:15:49 +0200
commit13bfa3b4873d304cce6b223fa3460718c0654071 (patch)
treec3d7816d433407a5131fc3f3132ce977f81c66dc /OpenKeychain/src/main/java/android/support/v4
parent236a502ea75d0cd6f999d0059db7d15f685c2ff2 (diff)
downloadopen-keychain-13bfa3b4873d304cce6b223fa3460718c0654071.tar.gz
open-keychain-13bfa3b4873d304cce6b223fa3460718c0654071.tar.bz2
open-keychain-13bfa3b4873d304cce6b223fa3460718c0654071.zip
test: add tons of tests and fuzzing for UncachedKeyRing.canonicalize
Diffstat (limited to 'OpenKeychain/src/main/java/android/support/v4')
0 files changed, 0 insertions, 0 deletions
old } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#include <asm/types.h>

/*
 * Additional declarations for the generic scheduler interface.  This should
 * only be included by files that implement conforming schedulers.
 *
 * Portions by Mark Williamson are (C) 2004 Intel Research Cambridge
 */

#define BUCKETS 10

typedef struct schedule_data_st
{
    spinlock_t          schedule_lock;  /* spinlock protecting curr pointer
                                            TODO check this */
    struct domain       *curr;          /* current task */
    struct domain       *idle;          /* idle task for this cpu */
    void *              sched_priv;
    struct ac_timer     s_timer;        /* scheduling timer  */
#ifdef BUCKETS
    u32                 hist[BUCKETS];  /* for scheduler latency histogram */
#endif
} __cacheline_aligned schedule_data_t;


typedef struct task_slice_st
{
    struct domain *task;
    s_time_t            time;
} task_slice_t;

struct scheduler
{
    char *name;             /* full name for this scheduler      */
    char *opt_name;         /* option name for this scheduler    */
    unsigned int sched_id;  /* ID for this scheduler             */

    int          (*init_scheduler) ();
    int          (*init_idle_task) (struct domain *);
    int          (*alloc_task)     (struct domain *);
    void         (*add_task)       (struct domain *);
    void         (*free_task)      (struct domain *);
    void         (*rem_task)       (struct domain *);
    void         (*sleep)          (struct domain *);
    void         (*wake)           (struct domain *);
    void         (*do_block)       (struct domain *);
    task_slice_t (*do_schedule)    (s_time_t);
    int          (*control)        (struct sched_ctl_cmd *);
    int          (*adjdom)         (struct domain *,
                                    struct sched_adjdom_cmd *);
    void         (*dump_settings)  (void);
    void         (*dump_cpu_state) (int);
    int          (*prn_state)      (int);
};

/* per CPU scheduler information */
extern schedule_data_t schedule_data[];

/*
 * Wrappers for run-queue management. Must be called with the schedule_lock
 * held.
 */
static inline void __add_to_runqueue_head(struct list_head *run_list, struct list_head *runqueue)
{
    list_add(run_list, runqueue);
}

static inline void __add_to_runqueue_tail(struct list_head *run_list, struct list_head *runqueue)
{
    list_add_tail(run_list, runqueue);
}

static inline void __del_from_runqueue(struct list_head *run_list)
{
    list_del(run_list);
    run_list->next = NULL;
}

static inline int __task_on_runqueue(struct list_head *run_list)
{
    return run_list->next != NULL;
}