type stringclasses 5
values | content stringlengths 9 163k |
|---|---|
defines | #define ASC_TX_AUTO_USER "AscAuto" |
defines |
#define ASC_EVENT_POOL_MAX (60) |
defines | #define asc_attr(_name) \ |
structs | struct asc_event{
int id;
struct list_head list;
char usage;
}; |
structs | struct asc_user{
struct asc_infor infor;
atomic_t count;
struct list_head node;
}; |
structs | struct asc_state_dsp{
char name[ASC_NAME_LEN];
/*state callback handle for events*/
int (*handle)(void * hd, int event);
}; |
structs | struct asc_tx_handle{
struct asc_config cfg;
atomic_t state;
atomic_t count;
struct list_head user_list;
struct asc_state_dsp *table;
/*process the event to switch different states*/
struct task_struct *thread;
atomic_t sleeping;
int ntf;
int wait_try;
int auto_delay;
sp... |
structs | struct asc_rx_handle{
struct asc_config cfg;
atomic_t state;
struct list_head user_list;
struct asc_state_dsp *table;
int ntf;
/*process the event to switch different states*/
struct task_struct *thread;
spinlock_t slock;
wait_queue_head_t wait;
struct mutex mlock;
struct wa... |
functions | void asc_event_free(struct asc_event * event)
{
unsigned long flags = 0;
if(!event)
return ;
spin_lock_irqsave(&hdlock, flags);
if(ASC_EVENT_STATIC == event->usage){
memset(event, 0, sizeof(struct asc_event));
} |
functions | irqreturn_t asc_irq_cp_indicate_state(int irq, void *data)
{
int level;
struct asc_tx_handle *tx = (struct asc_tx_handle *)data;
struct asc_config *cfg = &tx->cfg;
level = !!oem_gpio_get_value(cfg->gpio_ready);
oem_gpio_set_irq_type(cfg->gpio_ready, IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING);
... |
functions | irqreturn_t asc_irq_cp_wake_ap(int irq, void *data)
{
int level;
struct asc_rx_handle *rx = (struct asc_rx_handle *)data;
struct asc_config *cfg = &rx->cfg;
level = !!oem_gpio_get_value(cfg->gpio_wake);
oem_gpio_set_irq_type(cfg->gpio_wake, IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING);
ASCDPRT("... |
functions | void asc_rx_indicate_wake(struct asc_rx_handle *rx)
{
//if(rx->cfg.gpio_ready >= 0)
if(((rx->cfg.gpio_ready) & 0xFFFF) >= 0)
oem_gpio_direction_output(rx->cfg.gpio_ready, rx->cfg.polar);
} |
functions | void asc_rx_indicate_sleep(struct asc_rx_handle *rx)
{
//if(rx->cfg.gpio_ready >= 0)
if(((rx->cfg.gpio_ready) & 0xFFFF) >= 0)
oem_gpio_direction_output(rx->cfg.gpio_ready, !rx->cfg.polar);
} |
functions | int asc_rx_event_send(struct asc_rx_handle *rx, int id)
{
unsigned long flags = 0;
struct asc_event *event = NULL;
int ret = -ENODEV;
if(rx->thread == NULL){
ASCPRT("%s:no thread for event\n", __FUNCTION__);
return ret;
} |
functions | int asc_rx_event_recv(struct asc_rx_handle *rx)
{
unsigned long flags = 0;
struct asc_event *event = NULL;
int ret = -ENODEV;
if(rx->thread == NULL){
ASCPRT("%s:no thread for event\n", __FUNCTION__);
return ret;
} |
functions | int asc_rx_event_thread(void *data)
{
struct asc_rx_handle *rx = (struct asc_rx_handle *)data;
int id = 0, index;
char name[ASC_NAME_LEN] = {0} |
functions | void asc_rx_event_timer(unsigned long data)
{
struct asc_rx_handle *rx = (struct asc_rx_handle *)data;
//ASCDPRT("%s timer is time out.\n", rx->name);
asc_rx_event_send(rx, AP_RX_EVENT_IDLE_TIMEOUT);
} |
functions | void asc_tx_notifier_work(struct work_struct *work)
{
struct asc_infor *infor;
struct asc_user *user = NULL, *t = NULL;
struct asc_tx_handle *tx = container_of(work, struct asc_tx_handle,
ntf_work);
list_for_each_entry_safe(user, t, &tx->user_list, node){
infor = &user->infor;
... |
functions | void asc_rx_notifier_prepare_work(struct work_struct *work)
{
struct asc_infor *infor;
struct asc_user *user = NULL, *t = NULL;
struct asc_rx_handle *rx = container_of(work, struct asc_rx_handle,
ntf_prepare_work);
list_for_each_entry_safe(user, t, &rx->user_list, node){
infor = &user-... |
functions | void asc_rx_notifier_post_work(struct work_struct *work)
{
struct asc_infor *infor;
struct asc_user *user = NULL, *t = NULL;
struct asc_rx_handle *rx = container_of(work, struct asc_rx_handle,
ntf_post_work);
list_for_each_entry_safe(user, t, &rx->user_list, node){
infor = &user->infor... |
functions | void asc_tx_notifier(struct asc_tx_handle *tx, int ntf)
{
tx->ntf = ntf;
queue_work(asc_work_queue, &tx->ntf_work);
} |
functions | void asc_rx_notifier(struct asc_rx_handle *rx, int ntf)
{
rx->ntf = ntf;
if(ASC_NTF_RX_PREPARE == ntf){
queue_work(asc_work_queue, &rx->ntf_prepare_work);
} |
functions | else if(ASC_NTF_RX_POST == ntf){
queue_work(asc_work_queue, &rx->ntf_post_work);
} |
functions | int asc_rx_handle_init(struct asc_rx_handle *rx)
{
int ret = 0;
char *name = NULL;
struct asc_config *cfg = &rx->cfg;
if(((cfg->gpio_ready) & 0xFFFF) >= 0){
ret = oem_gpio_request(cfg->gpio_ready, "ap_ready");
if(ret < 0){
ASCPRT("Fail to requset ap_ready gpio %d for %s.\n",... |
functions | int asc_rx_handle_sleep(void *data, int event)
{
int ret = 0;
struct asc_rx_handle *rx = (struct asc_rx_handle *)data;
//ASCDPRT("Rx(%s): process event(%d) in state(%s).\n", rx->name, event, rx->table[atomic_read(&rx->state)].name);
if(AP_RX_ST_SLEEP != atomic_read(&rx->state)){
return 0;
... |
functions | int asc_rx_handle_wait_ready(void *data, int event)
{
int ret = 0;
struct asc_rx_handle *rx = (struct asc_rx_handle *)data;
//ASCDPRT("Rx(%s): process event(%d) in state(%s).\n", rx->name, event, rx->table[atomic_read(&rx->state)].name);
if(AP_RX_ST_WAIT_READY != atomic_read(&rx->state)){
retu... |
functions | int asc_rx_handle_ready(void *data, int event)
{
int ret = 0;
struct asc_rx_handle *rx = (struct asc_rx_handle *)data;
//ASCDPRT("Rx(%s): process event(%d) in state(%s).\n", rx->name, event, rx->table[atomic_read(&rx->state)].name);
if(AP_RX_ST_READY != atomic_read(&rx->state)){
return 0;
... |
functions | int asc_rx_handle_idle(void *data, int event)
{
int ret = 0;
unsigned long flags = 0;
struct asc_rx_handle *rx = (struct asc_rx_handle *)data;
/*FIXME: prevent from scheduled and interrupted to avoid error indication to CBP*/
spin_lock_irqsave(&rx->slock, flags);
//ASCDPRT("Rx(%s): proces... |
functions | void asc_tx_trig_busy(struct asc_tx_handle *tx)
{
mod_timer(&tx->timer_wait_idle, jiffies + msecs_to_jiffies(tx->auto_delay));
} |
functions | void asc_tx_wake_cp(struct asc_tx_handle *tx)
{
//if(tx->cfg.gpio_wake >= 0)
if(((tx->cfg.gpio_wake) & 0xFFFF) >= 0)
oem_gpio_direction_output(tx->cfg.gpio_wake, tx->cfg.polar);
} |
functions | void asc_tx_sleep_cp(struct asc_tx_handle *tx)
{
//if(tx->cfg.gpio_wake >= 0)
if(((tx->cfg.gpio_wake) & 0xFFFF) >= 0)
oem_gpio_direction_output(tx->cfg.gpio_wake, !tx->cfg.polar);
} |
functions | int asc_tx_cp_be_ready(struct asc_tx_handle *tx)
{
int ret = 0;
//if(tx->cfg.gpio_ready >= 0)
if(((tx->cfg.gpio_ready) & 0xFFFF) >= 0)
ret = ((!!oem_gpio_get_value(tx->cfg.gpio_ready)) == (tx->cfg.polar));
return ret;
} |
functions | int asc_tx_event_send(struct asc_tx_handle *tx, int id)
{
unsigned long flags = 0;
struct asc_event *event = NULL;
int ret = -ENODEV;
if(tx->thread == NULL){
ASCPRT("%s:no thread for event\n", __FUNCTION__);
return ret;
} |
functions | int asc_tx_event_recv(struct asc_tx_handle *tx)
{
unsigned long flags = 0;
struct asc_event *event = NULL;
int ret = -ENODEV;
if(tx->thread == NULL){
ASCPRT("%s:no thread for event\n", __FUNCTION__);
return ret;
} |
functions | int asc_tx_get_user(struct asc_tx_handle *tx, const char *name)
{
int ret = 0;
struct asc_user *user = NULL;
user = asc_tx_user_lookup(tx, name);
if(user){
atomic_inc(&user->count);
} |
functions | int asc_tx_put_user(struct asc_tx_handle *tx, const char *name)
{
struct asc_user *user = NULL;
int ret = 0;
user = asc_tx_user_lookup(tx, name);
if(user){
if(atomic_read(&user->count) >= 1){
atomic_dec(&user->count);
} |
functions | int asc_tx_refer(struct asc_tx_handle *tx, const char *name)
{
unsigned long flags = 0;
struct asc_user *user = NULL, *t = NULL;
int count = 0;
if(name){
/*get the reference count of the user*/
user = asc_tx_user_lookup(tx, name);
if(user){
count = atomic_read(&u... |
functions | int asc_rx_refer(struct asc_rx_handle *rx, const char *name)
{
unsigned long flags = 0;
struct asc_user *user = NULL, *t = NULL;
int count = 0;
if(name){
/*get the reference count of the user*/
user = asc_rx_user_lookup(rx, name);
if(user){
count = atomic_read(&u... |
functions | void asc_tx_refer_clear(struct asc_tx_handle *tx)
{
unsigned long flags = 0;
struct asc_user *user = NULL, *t = NULL;
spin_lock_irqsave(&tx->slock, flags);
list_for_each_entry_safe(user, t, &tx->user_list, node) {
atomic_set(&user->count, 0);
} |
functions | int asc_tx_event_thread(void *data)
{
struct asc_tx_handle *tx = (struct asc_tx_handle *)data;
int id = 0, index;
char name[ASC_NAME_LEN] = {0} |
functions | void asc_tx_wait_ready_timer(unsigned long data)
{
struct asc_tx_handle *tx = (struct asc_tx_handle *)data;
//ASCDPRT("%s tx wait ready timer is timeout.\n", tx->name);
asc_tx_event_send(tx, AP_TX_EVENT_WAIT_TIMEOUT);
} |
functions | void asc_tx_wait_idle_timer(unsigned long data)
{
char path[ASC_NAME_LEN] = {0} |
functions | void asc_tx_wait_sleep_timer(unsigned long data)
{
struct asc_tx_handle *tx = (struct asc_tx_handle *)data;
//ASCDPRT("%s tx wait sleep timer is timeout.\n", tx->name);
asc_tx_event_send(tx, AP_TX_EVENT_IDLE_TIMEOUT);
} |
functions | int asc_tx_handle_init(struct asc_tx_handle *tx)
{
int ret = 0;
char *name = NULL;
struct asc_config *cfg = &tx->cfg;
ret = oem_gpio_request(cfg->gpio_wake, "ap_wake_cp");
if(ret < 0){
ASCPRT("Fail to requset ap_wake_cp gpio %d for %s.\n", cfg->gpio_wake, cfg->name);
goto err_reques... |
functions | int asc_tx_handle_sleep(void *data, int event)
{
int ret = 0;
struct asc_tx_handle *tx = (struct asc_tx_handle *)data;
//ASCDPRT("Tx(%s): process event(%d) in state(%s).\n", tx->name, event, tx->table[atomic_read(&tx->state)].name);
if(AP_TX_ST_SLEEP != atomic_read(&tx->state)){
return 0;
... |
functions | int asc_tx_handle_wait_ready(void *data, int event)
{
int ret = 0;
struct asc_tx_handle *tx = (struct asc_tx_handle *)data;
if(AP_TX_ST_WAIT_READY != atomic_read(&tx->state)){
return 0;
} |
functions | int asc_tx_handle_ready(void *data, int event)
{
int ret = 0;
struct asc_tx_handle *tx = (struct asc_tx_handle *)data;
if(AP_TX_ST_READY != atomic_read(&tx->state)){
return 0;
} |
functions | int asc_tx_handle_idle(void *data, int event)
{
int ret = 0;
struct asc_tx_handle *tx = (struct asc_tx_handle *)data;
if(AP_TX_ST_IDLE != atomic_read(&tx->state)){
return 0;
} |
functions | void asc_tx_handle_reset(struct asc_tx_handle *tx)
{
unsigned long flags;
ASCDPRT("%s %s\n", __FUNCTION__, tx->cfg.name);
del_timer(&tx->timer_wait_ready);
del_timer(&tx->timer_wait_idle);
del_timer(&tx->timer_wait_sleep);
spin_lock_irqsave(&tx->slock, flags);
INIT_LIST_HEAD(&tx->event_q);... |
functions | void asc_tx_reset(const char *name)
{
struct asc_tx_handle *tx = NULL;
tx = asc_tx_handle_lookup(name);
if(tx){
asc_tx_event_send(tx, AP_TX_EVENT_RESET);
} |
functions | int asc_tx_set_auto_delay(const char *name, int delay)
{
int ret = 0;
unsigned long flags;
struct asc_tx_handle *tx;
tx = asc_tx_handle_lookup(name);
if(!tx){
ret = -ENODEV;
goto end;
} |
functions | int asc_tx_check_ready(const char *name)
{
int ret = 0;
struct asc_tx_handle *tx;
tx = asc_tx_handle_lookup(name);
if(NULL == tx)
return -ENODEV;
ret = atomic_read(&tx->state);
if((ret == AP_TX_ST_READY) && (!atomic_read(&tx->sleeping))){
ret = 1;
} |
functions | int asc_tx_user_count(const char *path)
{
const char *name;
char hname[ASC_NAME_LEN] = {0} |
functions | int asc_tx_add_user(const char *name, struct asc_infor *infor)
{
int ret = 0;
unsigned long flags = 0;
struct asc_tx_handle *tx;
struct asc_user *user;
tx = asc_tx_handle_lookup(name);
if(NULL == tx)
return -ENODEV;
user = asc_tx_user_lookup(tx, infor->name);
if(NULL == user){
... |
functions | void asc_tx_del_user(const char *path)
{
unsigned long flags = 0;
char hname[ASC_NAME_LEN] = {0} |
functions | int asc_tx_get_ready(const char *path, int sync)
{
int ret = 0;
int try = 1;
char hname[ASC_NAME_LEN] = {0} |
functions | else if(try < ASC_TX_TRY_TIMES){
asc_tx_event_send(tx, AP_TX_EVENT_REQUEST);
try++;
} |
functions | int asc_tx_put_ready(const char *path, int sync)
{
int ret = 0;
char hname[ASC_NAME_LEN] = {0} |
functions | int asc_tx_auto_ready(const char *name, int sync)
{
int ret = 0;
int try = 1;
struct asc_user *user;
struct asc_tx_handle *tx;
if (!name) {
ASCPRT("%s:Invalid name\n", __FUNCTION__);
return -EINVAL;
} |
functions | else if(ret == 0){//expired timer, send REQUEST to reactive the STOP state
asc_tx_event_send(tx, AP_TX_EVENT_REQUEST);
break;
} |
functions | else if(try < ASC_TX_TRY_TIMES){
asc_tx_event_send(tx, AP_TX_EVENT_REQUEST);
try++;
} |
functions | void asc_rx_handle_reset(struct asc_rx_handle *rx)
{
unsigned long flags;
ASCDPRT("%s %s\n", __FUNCTION__, rx->cfg.name);
del_timer(&rx->timer);
wake_unlock(&rx->wlock);
asc_rx_indicate_sleep(rx);
atomic_set(&rx->state, AP_RX_ST_SLEEP);
spin_lock_irqsave(&rx->slock, flags);
INIT_LIST_HE... |
functions | void asc_rx_reset(const char *name)
{
struct asc_rx_handle *rx = NULL;
rx = asc_rx_handle_lookup(name);
if(rx){
asc_rx_event_send(rx, AP_RX_EVENT_RESET);
} |
functions | int asc_rx_add_user(const char *name, struct asc_infor *infor)
{
int ret = 0;
unsigned long flags = 0;
struct asc_rx_handle *rx;
struct asc_user *user;
rx = asc_rx_handle_lookup(name);
if(NULL == rx)
return -ENODEV;
user = asc_rx_user_lookup(rx, infor->name);
if(NULL == user){
... |
functions | void asc_rx_del_user(const char *path)
{
unsigned long flags = 0;
const char *name;
char hname[ASC_NAME_LEN] = {0} |
functions | int asc_rx_confirm_ready(const char *name, int ready)
{
struct asc_rx_handle *rx = NULL;
rx = asc_rx_handle_lookup(name);
if(!rx){
ASCDPRT("%s: name %s is unknow\n", __FUNCTION__, name);
return -ENODEV;
} |
functions | int asc_rx_check_on_start(const char *name)
{
int level;
struct asc_config *cfg = NULL;
struct asc_rx_handle *rx = NULL;
int ret = 1;
rx = asc_rx_handle_lookup(name);
if(!rx){
ASCPRT("config %s has not already exist.\n", name);
return -EINVAL;
} |
functions | ssize_t asc_debug_show(struct kobject *kobj, struct kobj_attribute *attr,
char *buf)
{
char *s = buf;
s += sprintf(s, "%d\n", asc_debug);
return (s - buf);
} |
functions | ssize_t asc_debug_store(struct kobject *kobj, struct kobj_attribute *attr,
const char *buf, size_t n)
{
unsigned long val;
if (strict_strtoul(buf, 10, &val))
return -EINVAL;
if (val < 0)
return -EINVAL;
asc_debug = val;
return n;
} |
functions | ssize_t asc_infor_show(struct kobject *kobj, struct kobj_attribute *attr,
char *buf)
{
char *s = buf;
int val1, val2;
struct asc_config *cfg;
struct asc_infor *infor;
struct asc_user *user = NULL, *tuser = NULL;
struct asc_tx_handle *tx = NULL, *ttmp = NULL;
struct asc_rx_handle *rx ... |
functions | ssize_t asc_infor_store(struct kobject *kobj, struct kobj_attribute *attr,
const char *buf, size_t n)
{
return n;
} |
functions | ssize_t asc_refer_show(struct kobject *kobj, struct kobj_attribute *attr,
char *buf)
{
unsigned long flags;
char *s = buf;
struct asc_tx_handle *tx, *tmp, *t;
tx = tmp = NULL;
spin_lock_irqsave(&hdlock, flags);
list_for_each_entry_safe(tmp, t, &asc_tx_handle_list, node){
if(tmp-... |
functions | ssize_t asc_refer_store(struct kobject *kobj, struct kobj_attribute *attr,
const char *buf, size_t n)
{
unsigned long flags;
char *p;
int error = 0, len;
char path[ASC_NAME_LEN] = {0} |
functions | ssize_t asc_state_show(struct kobject *kobj, struct kobj_attribute *attr,
char *buf)
{
unsigned long flags;
char *s = buf;
struct asc_tx_handle *tx, *tmp, *t;
tx = tmp = NULL;
spin_lock_irqsave(&hdlock, flags);
list_for_each_entry_safe(tmp, t, &asc_tx_handle_list, node){
if(tmp-... |
functions | ssize_t asc_state_store(struct kobject *kobj, struct kobj_attribute *attr,
const char *buf, size_t n)
{
return n;
} |
functions | ssize_t asc_auto_ready_show(struct kobject *kobj, struct kobj_attribute *attr,
char *buf)
{
unsigned long flags;
char *s = buf;
struct asc_tx_handle *tx, *tmp, *t;
tx = tmp = NULL;
spin_lock_irqsave(&hdlock, flags);
list_for_each_entry_safe(tmp, t, &asc_tx_handle_list, node){
if... |
functions | ssize_t asc_auto_ready_store(struct kobject *kobj, struct kobj_attribute *attr,
const char *buf, size_t n)
{
int error = 0;
long val;
unsigned long flags;
struct asc_tx_handle *tx, *tmp, *t;
tx = tmp = NULL;
spin_lock_irqsave(&hdlock, flags);
list_for_each_entry_safe(tmp, t, &asc_tx_h... |
functions | ssize_t asc_confirm_ready_show(struct kobject *kobj, struct kobj_attribute *attr,
char *buf)
{
unsigned long flags;
char *s = buf;
struct asc_rx_handle *rx, *tmp, *t;
rx = tmp = NULL;
spin_lock_irqsave(&hdlock, flags);
list_for_each_entry_safe(tmp, t, &asc_rx_handle_list, node){
... |
functions | ssize_t asc_confirm_ready_store(struct kobject *kobj, struct kobj_attribute *attr,
const char *buf, size_t n)
{
int error = 0;
long val;
unsigned long flags;
struct asc_rx_handle *rx, *tmp, *t;
rx = tmp = NULL;
spin_lock_irqsave(&hdlock, flags);
list_for_each_entry_safe(tmp, t, &asc_r... |
functions | int asc_rx_register_handle(struct asc_config *cfg)
{
int ret = 0;
unsigned long flags;
struct asc_rx_handle *rx = NULL;
if(NULL == asc_work_queue){
ASCPRT("%s: error Asc has not been init\n", __FUNCTION__);
return -EINVAL;
} |
functions | int asc_tx_register_handle(struct asc_config *cfg)
{
int ret=0;
unsigned long flags;
struct asc_infor infor;
struct asc_tx_handle *tx = NULL;
if(NULL == asc_work_queue){
ASCPRT("%s: error Asc has not been init\n", __FUNCTION__);
return -EINVAL;
} |
functions | __init asc_init(void)
{
int ret;
ret = platform_device_register(&asc_device);
if (ret) {
ASCPRT("platform_device_register failed\n");
goto err_platform_device_register;
} |
functions | void set_feature(CPUUniCore32State *env, int feature)
{
env->features |= feature;
} |
functions | void unicore_ii_cpu_initfn(Object *obj)
{
UniCore32CPU *cpu = UNICORE32_CPU(obj);
CPUUniCore32State *env = &cpu->env;
env->cp0.c0_cpuid = 0x4d000863;
env->cp0.c0_cachetype = 0x0d152152;
env->cp0.c1_sys = 0x2000;
env->cp0.c2_base = 0x0;
env->cp0.c3_faultstatus = 0x0;
env->cp0.c4_faultadd... |
functions | void uc32_any_cpu_initfn(Object *obj)
{
UniCore32CPU *cpu = UNICORE32_CPU(obj);
CPUUniCore32State *env = &cpu->env;
env->cp0.c0_cpuid = 0xffffffff;
env->ucf64.xregs[UC32_UCF64_FPSCR] = 0;
set_feature(env, UC32_HWCAP_CMOV);
set_feature(env, UC32_HWCAP_UCF64);
} |
functions | void uc32_cpu_realizefn(DeviceState *dev, Error **errp)
{
UniCore32CPU *cpu = UNICORE32_CPU(dev);
UniCore32CPUClass *ucc = UNICORE32_CPU_GET_CLASS(dev);
qemu_init_vcpu(&cpu->env);
ucc->parent_realize(dev, errp);
} |
functions | void uc32_cpu_initfn(Object *obj)
{
CPUState *cs = CPU(obj);
UniCore32CPU *cpu = UNICORE32_CPU(obj);
CPUUniCore32State *env = &cpu->env;
static bool inited;
cs->env_ptr = env;
cpu_exec_init(env);
#ifdef CONFIG_USER_ONLY
env->uncached_asr = ASR_MODE_USER;
env->regs[31] = 0;
#else
en... |
functions | void uc32_cpu_class_init(ObjectClass *oc, void *data)
{
DeviceClass *dc = DEVICE_CLASS(oc);
CPUClass *cc = CPU_CLASS(oc);
UniCore32CPUClass *ucc = UNICORE32_CPU_CLASS(oc);
ucc->parent_realize = dc->realize;
dc->realize = uc32_cpu_realizefn;
cc->class_by_name = uc32_cpu_class_by_name;
cc->d... |
functions | void uc32_register_cpu_type(const UniCore32CPUInfo *info)
{
TypeInfo type_info = {
.parent = TYPE_UNICORE32_CPU,
.instance_init = info->instance_init,
} |
functions | void uc32_cpu_register_types(void)
{
int i;
type_register_static(&uc32_cpu_type_info);
for (i = 0; i < ARRAY_SIZE(uc32_cpus); i++) {
uc32_register_cpu_type(&uc32_cpus[i]);
} |
includes |
#include <config.h> |
includes |
#include <ctype.h> |
includes | #include <stdbool.h> |
includes | #include <stdio.h> |
includes | #include <stdlib.h> |
includes | #include <string.h> |
functions | bool
mbsstr_trimmed_wordbounded (const char *string, const char *sub)
{
char *tsub = trim (sub);
bool found = false;
for (; *string != '\0';)
{
const char *tsub_in_string = mbsstr (string, tsub);
if (tsub_in_string == NULL)
break;
else
{
if (MB_CUR_MAX > 1)
... |
functions | int
main (int argc, char *argv[])
{
setlocale (LC_ALL, "");
printf ("%s\n", proper_name_utf8 ("Franc,ois Pinard", "Fran\303\247ois Pinard"));
return 0;
} |
main | int
main (int argc, char *argv[])
{
setlocale (LC_ALL, "");
if (mbsstr_trimmed_wordbounded (argv[1], argv[2]))
printf("found\n");
return 0;
} |
includes |
#include <string.h> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.