type stringclasses 5
values | content stringlengths 9 163k |
|---|---|
includes |
#include <rtems/bspsmp.h> |
includes | #include <rtems/score/thread.h> |
includes | #include <rtems/score/threaddispatch.h> |
includes | #include <rtems/score/smp.h> |
includes | #include <rtems/score/sysstate.h> |
includes | #include <rtems/bspIo.h> |
functions | void rtems_smp_secondary_cpu_initialize( void )
{
Per_CPU_Control *self_cpu = _Per_CPU_Get();
Thread_Control *heir;
#if defined(RTEMS_DEBUG)
printk( "Made it to %d -- ", _Per_CPU_Get_index( self_cpu ) );
#endif
_Per_CPU_Change_state( self_cpu, PER_CPU_STATE_READY_TO_BEGIN_MULTITASKING );
_Per_CPU_Wa... |
functions | void rtems_smp_process_interrupt( void )
{
Per_CPU_Control *self_cpu = _Per_CPU_Get();
if ( self_cpu->message != 0 ) {
uint32_t message;
ISR_Level level;
_Per_CPU_Lock_acquire( self_cpu, level );
message = self_cpu->message;
self_cpu->message = 0;
_Per_CPU_Lock_release( self_cpu, level )... |
functions | void _SMP_Send_message( uint32_t cpu, uint32_t message )
{
Per_CPU_Control *per_cpu = _Per_CPU_Get_by_index( cpu );
ISR_Level level;
#if defined(RTEMS_DEBUG)
if ( message & RTEMS_BSP_SMP_SIGNAL_TO_SELF )
printk( "Send 0x%x to %d\n", message, cpu );
#endif
_Per_CPU_Lock_acquire( per_cpu, level );
... |
functions | void _SMP_Broadcast_message( uint32_t message )
{
uint32_t self = _SMP_Get_current_processor();
uint32_t ncpus = _SMP_Get_processor_count();
uint32_t cpu;
for ( cpu = 0 ; cpu < ncpus ; ++cpu ) {
if ( cpu != self ) {
Per_CPU_Control *per_cpu = _Per_CPU_Get_by_index( cpu );
ISR_Level level;
... |
functions | void _SMP_Request_other_cores_to_perform_first_context_switch( void )
{
uint32_t self = _SMP_Get_current_processor();
uint32_t ncpus = _SMP_Get_processor_count();
uint32_t cpu;
for ( cpu = 0 ; cpu < ncpus ; ++cpu ) {
Per_CPU_Control *per_cpu = _Per_CPU_Get_by_index( cpu );
if ( cpu != self ) {
_... |
functions | void _SMP_Request_other_cores_to_shutdown( void )
{
uint32_t self = _SMP_Get_current_processor();
uint32_t ncpus = _SMP_Get_processor_count();
uint32_t cpu;
_SMP_Broadcast_message( RTEMS_BSP_SMP_SHUTDOWN );
for ( cpu = 0 ; cpu < ncpus ; ++cpu ) {
if ( cpu != self ) {
_Per_CPU_Wait_for_state(
... |
defines | #define THIS_FILE_ID OAM_FILE_ID_DMAC_AUTO_ADJUST_FREQ_C |
functions | oal_uint8 dmac_get_device_freq_level(void)
{
oal_uint8 uc_vap_id;
mac_vap_stru *pst_mac_vap;
wlan_auto_freq_bw_enum_uint8 uc_auto_freq_bw_type = WLAN_BW_20;
for (uc_vap_id = 0; uc_vap_id < WLAN_VAP_MAX_NUM_PER_DEVICE_LIMIT; uc_vap_id++)
{
pst_mac_vap = (mac_vap_stru *)mac_res_get_mac_vap(uc... |
functions | oal_uint32 dmac_get_device_freq_value(oal_device_freq_type_enum_uint8 uc_device_freq_type,wlan_auto_freq_bw_enum_uint8 uc_auto_freq_bw_type,oal_uint16* pusdevice_freq_value)
{
if (uc_device_freq_type > FREQ_HIGHEST)
{
OAM_ERROR_LOG1(0, OAM_SF_ANY, "{dmac_get_device_freq_value:para error,uc_device_freq_t... |
includes |
#include <linux/errno.h> |
includes | #include <linux/fs.h> |
includes | #include <linux/init.h> |
includes | #include <linux/io.h> |
includes | #include <linux/kernel.h> |
includes | #include <linux/miscdevice.h> |
includes | #include <linux/module.h> |
includes | #include <linux/moduleparam.h> |
includes | #include <linux/platform_device.h> |
includes | #include <linux/types.h> |
includes | #include <linux/watchdog.h> |
includes | #include <linux/jiffies.h> |
includes | #include <linux/timer.h> |
includes | #include <linux/bitops.h> |
includes | #include <linux/uaccess.h> |
includes |
#include <mach/at91_wdt.h> |
defines |
#define DRV_NAME "AT91SAM9 Watchdog" |
defines |
#define ms_to_ticks(t) (((t << 8) / 1000) - 1) |
defines | #define ticks_to_ms(t) (((t + 1) * 1000) >> 8) |
defines | #define WDT_HW_TIMEOUT 2 |
defines | #define WDT_TIMEOUT (HZ/2) |
defines | #define WDT_HEARTBEAT 15 |
defines | #define at91wdt_suspend NULL |
defines | #define at91wdt_resume NULL |
functions | void at91_wdt_reset(void)
{
at91_sys_write(AT91_WDT_CR, AT91_WDT_KEY | AT91_WDT_WDRSTT);
} |
functions | void at91_ping(unsigned long data)
{
if (time_before(jiffies, at91wdt_private.next_heartbeat) ||
(!nowayout && !at91wdt_private.open)) {
at91_wdt_reset();
mod_timer(&at91wdt_private.timer, jiffies + WDT_TIMEOUT);
} |
functions | int at91_wdt_open(struct inode *inode, struct file *file)
{
if (test_and_set_bit(0, &at91wdt_private.open))
return -EBUSY;
at91wdt_private.next_heartbeat = jiffies + heartbeat * HZ;
mod_timer(&at91wdt_private.timer, jiffies + WDT_TIMEOUT);
return nonseekable_open(inode, file);
} |
functions | int at91_wdt_close(struct inode *inode, struct file *file)
{
clear_bit(0, &at91wdt_private.open);
/* stop internal ping */
if (!at91wdt_private.expect_close)
del_timer(&at91wdt_private.timer);
at91wdt_private.expect_close = 0;
return 0;
} |
functions | int at91_wdt_settimeout(unsigned int timeout)
{
unsigned int reg;
unsigned int mr;
/* Check if disabled */
mr = at91_sys_read(AT91_WDT_MR);
if (mr & AT91_WDT_WDDIS) {
printk(KERN_ERR DRV_NAME": sorry, watchdog is disabled\n");
return -EIO;
} |
functions | long at91_wdt_ioctl(struct file *file,
unsigned int cmd, unsigned long arg)
{
void __user *argp = (void __user *)arg;
int __user *p = argp;
int new_value;
switch (cmd) {
case WDIOC_GETSUPPORT:
return copy_to_user(argp, &at91_wdt_info,
sizeof(at91_wdt_info)) ? -EFAULT : 0;
case WDIOC_GETSTATUS:
case... |
functions | ssize_t at91_wdt_write(struct file *file, const char *data, size_t len,
loff_t *ppos)
{
if (!len)
return 0;
/* Scan for magic character */
if (!nowayout) {
size_t i;
at91wdt_private.expect_close = 0;
for (i = 0; i < len; i++) {
char c;
if (get_user(c, data + i))
return -EFAULT;
if (c ... |
functions | __init at91wdt_probe(struct platform_device *pdev)
{
int res;
if (at91wdt_miscdev.parent)
return -EBUSY;
at91wdt_miscdev.parent = &pdev->dev;
/* Set watchdog */
res = at91_wdt_settimeout(ms_to_ticks(WDT_HW_TIMEOUT * 1000));
if (res)
return res;
res = misc_register(&at91wdt_miscdev);
if (res)
return res... |
functions | __exit at91wdt_remove(struct platform_device *pdev)
{
int res;
res = misc_deregister(&at91wdt_miscdev);
if (!res)
at91wdt_miscdev.parent = NULL;
return res;
} |
functions | int at91wdt_suspend(struct platform_device *pdev, pm_message_t message)
{
return 0;
} |
functions | int at91wdt_resume(struct platform_device *pdev)
{
return 0;
} |
functions | __init at91sam_wdt_init(void)
{
return platform_driver_probe(&at91wdt_driver, at91wdt_probe);
} |
functions | __exit at91sam_wdt_exit(void)
{
platform_driver_unregister(&at91wdt_driver);
} |
includes |
#include <linux/module.h> |
includes |
#include <linux/types.h> |
includes | #include <linux/list.h> |
includes | #include <linux/errno.h> |
includes | #include <linux/kernel.h> |
includes | #include <linux/sched.h> |
includes | #include <linux/skbuff.h> |
includes | #include <linux/init.h> |
includes | #include <linux/poll.h> |
includes | #include <net/sock.h> |
includes | #include <asm/ioctls.h> |
includes | #include <linux/kmod.h> |
includes |
#include <net/bluetooth/bluetooth.h> |
includes | #include <linux/android_aid.h> |
defines | #define BT_DBG(D...) |
defines |
#define VERSION "2.16" |
defines | #define BT_MAX_PROTO 8 |
functions | void bt_sock_reclassify_lock(struct socket *sock, int proto)
{
struct sock *sk = sock->sk;
if (!sk)
return;
BUG_ON(sock_owned_by_user(sk));
sock_lock_init_class_and_name(sk,
bt_slock_key_strings[proto], &bt_slock_key[proto],
bt_key_strings[proto], &bt_lock_key[proto]);
} |
functions | int bt_sock_register(int proto, const struct net_proto_family *ops)
{
int err = 0;
if (proto < 0 || proto >= BT_MAX_PROTO)
return -EINVAL;
write_lock(&bt_proto_lock);
if (bt_proto[proto])
err = -EEXIST;
else
bt_proto[proto] = ops;
write_unlock(&bt_proto_lock);
return err;
} |
functions | int bt_sock_unregister(int proto)
{
int err = 0;
if (proto < 0 || proto >= BT_MAX_PROTO)
return -EINVAL;
write_lock(&bt_proto_lock);
if (!bt_proto[proto])
err = -ENOENT;
else
bt_proto[proto] = NULL;
write_unlock(&bt_proto_lock);
return err;
} |
functions | int current_has_bt_admin(void)
{
return (uid_eq(current_euid(), GLOBAL_ROOT_UID) ||
in_egroup_p(AID_NET_BT_ADMIN));
} |
functions | int current_has_bt(void)
{
return (current_has_bt_admin() || in_egroup_p(AID_NET_BT));
} |
functions | int current_has_bt_admin(void)
{
return 1;
} |
functions | int current_has_bt(void)
{
return 1;
} |
functions | int bt_sock_create(struct net *net, struct socket *sock, int proto,
int kern)
{
int err;
if (proto == BTPROTO_RFCOMM || proto == BTPROTO_SCO ||
proto == BTPROTO_L2CAP) {
if (!current_has_bt())
return -EPERM;
} |
functions | void bt_sock_link(struct bt_sock_list *l, struct sock *sk)
{
write_lock_bh(&l->lock);
sk_add_node(sk, &l->head);
write_unlock_bh(&l->lock);
} |
functions | void bt_sock_unlink(struct bt_sock_list *l, struct sock *sk)
{
write_lock_bh(&l->lock);
sk_del_node_init(sk);
write_unlock_bh(&l->lock);
} |
functions | void bt_accept_enqueue(struct sock *parent, struct sock *sk)
{
BT_DBG("parent %p, sk %p", parent, sk);
sock_hold(sk);
list_add_tail(&bt_sk(sk)->accept_q, &bt_sk(parent)->accept_q);
bt_sk(sk)->parent = parent;
parent->sk_ack_backlog++;
} |
functions | void bt_accept_unlink(struct sock *sk)
{
BT_DBG("sk %p state %d", sk, sk->sk_state);
list_del_init(&bt_sk(sk)->accept_q);
if (bt_sk(sk)->parent != NULL) {
bt_sk(sk)->parent->sk_ack_backlog--;
bt_sk(sk)->parent = NULL;
} |
functions | int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
struct msghdr *msg, size_t len, int flags)
{
int noblock = flags & MSG_DONTWAIT;
struct sock *sk = sock->sk;
struct sk_buff *skb;
size_t copied;
int err;
BT_DBG("sock %p sk %p len %zu", sock, sk, len);
if (flags & (MSG_OOB))
return -EOPNOTSUPP;... |
functions | long bt_sock_data_wait(struct sock *sk, long timeo)
{
DECLARE_WAITQUEUE(wait, current);
add_wait_queue(sk_sleep(sk), &wait);
for (;;) {
set_current_state(TASK_INTERRUPTIBLE);
if (!skb_queue_empty(&sk->sk_receive_queue))
break;
if (sk->sk_err || (sk->sk_shutdown & RCV_SHUTDOWN))
break;
if (signal_pe... |
functions | int bt_sock_stream_recvmsg(struct kiocb *iocb, struct socket *sock,
struct msghdr *msg, size_t size, int flags)
{
struct sock *sk = sock->sk;
int err = 0;
size_t target, copied = 0;
long timeo;
if (flags & MSG_OOB)
return -EOPNOTSUPP;
msg->msg_namelen = 0;
BT_DBG("sk %p size %zu", sk, size);
loc... |
functions | int bt_accept_poll(struct sock *parent)
{
struct list_head *p, *n;
struct sock *sk;
list_for_each_safe(p, n, &bt_sk(parent)->accept_q) {
sk = (struct sock *) list_entry(p, struct bt_sock, accept_q);
if (sk->sk_state == BT_CONNECTED ||
(bt_sk(parent)->defer_setup &&
sk->sk_state == BT_CONNECT2))
re... |
functions | int bt_sock_poll(struct file *file, struct socket *sock, poll_table *wait)
{
struct sock *sk = sock->sk;
unsigned int mask = 0;
BT_DBG("sock %p, sk %p", sock, sk);
poll_wait(file, sk_sleep(sk), wait);
if (sk->sk_state == BT_LISTEN)
return bt_accept_poll(sk);
if (sk->sk_err || !skb_queue_empty(&sk->sk_error_... |
functions | int bt_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
{
struct sock *sk = sock->sk;
struct sk_buff *skb;
long amount;
int err;
BT_DBG("sk %p cmd %x arg %lx", sk, cmd, arg);
switch (cmd) {
case TIOCOUTQ:
if (sk->sk_state == BT_LISTEN)
return -EINVAL;
amount = sk->sk_sndbuf - sk_wme... |
functions | int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo)
{
DECLARE_WAITQUEUE(wait, current);
int err = 0;
BT_DBG("sk %p", sk);
add_wait_queue(sk_sleep(sk), &wait);
set_current_state(TASK_INTERRUPTIBLE);
while (sk->sk_state != state) {
if (!timeo) {
err = -EINPROGRESS;
break;
} |
functions | __init bt_init(void)
{
int err;
BT_INFO("Core ver %s", VERSION);
err = bt_sysfs_init();
if (err < 0)
return err;
err = sock_register(&bt_sock_family_ops);
if (err < 0) {
bt_sysfs_cleanup();
return err;
} |
functions | __exit bt_exit(void)
{
sco_exit();
l2cap_exit();
hci_sock_cleanup();
sock_unregister(PF_BLUETOOTH);
bt_sysfs_cleanup();
} |
includes | #include <linux/ieee80211.h> |
includes | #include <linux/etherdevice.h> |
defines | #define TX_STATUS_FAIL(x) case TX_STATUS_FAIL_ ## x: return #x |
defines | #define TX_STATUS_POSTPONE(x) case TX_STATUS_POSTPONE_ ## x: return #x |
defines | #define AGG_TX_STATE_(x) case AGG_TX_STATE_ ## x: return #x |
functions | void iwl_mvm_set_tx_cmd(struct iwl_mvm *mvm, struct sk_buff *skb,
struct iwl_tx_cmd *tx_cmd,
struct ieee80211_tx_info *info, u8 sta_id)
{
struct ieee80211_hdr *hdr = (void *)skb->data;
__le16 fc = hdr->frame_control;
u32 tx_flags = le32_to_cpu(tx_cmd->tx_flags);
u32 len = skb->len + FCS_LEN;
i... |
functions | void iwl_mvm_set_tx_cmd_rate(struct iwl_mvm *mvm,
struct iwl_tx_cmd *tx_cmd,
struct ieee80211_tx_info *info,
struct ieee80211_sta *sta,
__le16 fc)
{
u32 rate_flags;
int rate_idx;
u8 rate_plcp;
/* Set retry limit on RTS packets */
tx_cmd->rts_retry_limit = IWL_RTS_DFAULT_RETRY_LIMIT... |
functions | void iwl_mvm_set_tx_cmd_crypto(struct iwl_mvm *mvm,
struct ieee80211_tx_info *info,
struct iwl_tx_cmd *tx_cmd,
struct sk_buff *skb_frag)
{
struct ieee80211_key_conf *keyconf = info->control.hw_key;
switch (keyconf->cipher) {
case WLAN_CIPHER_SUITE_CCMP:
tx_cmd->sec_ctl = TX_CMD_SEC_C... |
functions | int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb)
{
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
struct iwl_device_cmd *dev_cmd;
struct iwl_tx_cmd *tx_cmd;
u8 sta_id;
if (WARN_ON_ONCE(info->flags & IEEE80211_TX_CTL_AMPDU... |
functions | int iwl_mvm_tx_skb(struct iwl_mvm *mvm, struct sk_buff *skb,
struct ieee80211_sta *sta)
{
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
struct iwl_mvm_sta *mvmsta;
struct iwl_device_cmd *dev_cmd;
struct iwl_tx_cmd *tx_cmd;
__le16 fc;
u... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.