Skip to content
Snippets Groups Projects
Select Git revision
  • 977a7a15231f6c510229f616dd0c24632fcbee4d
  • master default protected
  • android-msm-bullhead-3.10-nougat_kgdb_less_changes
  • android-msm-bullhead-3.10-nougat_kgdb
  • android-msm-bullhead-3.10-nougat_klist
  • android-4.4
  • android-msm-vega-4.4-oreo-daydream
  • android-msm-wahoo-4.4-p-preview-5
  • android-msm-wahoo-4.4-pie
  • android-msm-marlin-3.18-p-preview-5
  • android-msm-marlin-3.18-pie
  • android-msm-wahoo-2018.07-oreo-m2
  • android-msm-wahoo-2018.07-oreo-m4
  • android-msm-wahoo-4.4-p-preview-4
  • android-msm-bullhead-3.10-oreo-m6
  • android-msm-angler-3.10-oreo-m6
  • android-msm-marlin-3.18-p-preview-4
  • android-msm-stargazer-3.18-oreo-wear-dr
  • android-msm-catshark-3.18-oreo-wear-dr
  • android-msm-wahoo-4.4-oreo-m2
  • android-msm-wahoo-4.4-oreo-m4
  • android-daydreamos-8.0.0_r0.5
  • android-8.1.0_r0.92
  • android-8.1.0_r0.91
  • android-daydreamos-8.0.0_r0.4
  • android-p-preview-5_r0.2
  • android-p-preview-5_r0.1
  • android-9.0.0_r0.5
  • android-9.0.0_r0.4
  • android-9.0.0_r0.2
  • android-9.0.0_r0.1
  • android-8.1.0_r0.81
  • android-8.1.0_r0.80
  • android-8.1.0_r0.78
  • android-8.1.0_r0.76
  • android-8.1.0_r0.75
  • android-8.1.0_r0.72
  • android-8.1.0_r0.70
  • android-p-preview-4_r0.2
  • android-p-preview-4_r0.1
  • android-wear-8.0.0_r0.30
41 results

async.h

Blame
  • async.h 1.65 KiB
    /*
     * async.h: Asynchronous function calls for boot performance
     *
     * (C) Copyright 2009 Intel Corporation
     * Author: Arjan van de Ven <arjan@linux.intel.com>
     *
     * This program is free software; you can redistribute it and/or
     * modify it under the terms of the GNU General Public License
     * as published by the Free Software Foundation; version 2
     * of the License.
     */
    #ifndef __ASYNC_H__
    #define __ASYNC_H__
    
    #include <linux/types.h>
    #include <linux/list.h>
    
    typedef u64 async_cookie_t;
    typedef void (*async_func_t) (void *data, async_cookie_t cookie);
    struct async_domain {
    	struct list_head pending;
    	unsigned registered:1;
    };
    
    /*
     * domain participates in global async_synchronize_full
     */
    #define ASYNC_DOMAIN(_name) \
    	struct async_domain _name = { .pending = LIST_HEAD_INIT(_name.pending),	\
    				      .registered = 1 }
    
    /*
     * domain is free to go out of scope as soon as all pending work is
     * complete, this domain does not participate in async_synchronize_full
     */
    #define ASYNC_DOMAIN_EXCLUSIVE(_name) \
    	struct async_domain _name = { .pending = LIST_HEAD_INIT(_name.pending), \
    				      .registered = 0 }
    
    extern async_cookie_t async_schedule(async_func_t func, void *data);
    extern async_cookie_t async_schedule_domain(async_func_t func, void *data,
    					    struct async_domain *domain);
    void async_unregister_domain(struct async_domain *domain);
    extern void async_synchronize_full(void);
    extern void async_synchronize_full_domain(struct async_domain *domain);
    extern void async_synchronize_cookie(async_cookie_t cookie);
    extern void async_synchronize_cookie_domain(async_cookie_t cookie,
    					    struct async_domain *domain);
    extern bool current_is_async(void);
    #endif