type stringclasses 5
values | content stringlengths 9 163k |
|---|---|
functions | uint8 IsrBtn1Pressed_GetState(void)
{
/* Get the state of the general interrupt. */
return ((*IsrBtn1Pressed_INTC_SET_EN & (uint32)IsrBtn1Pressed__INTC_MASK) != 0u) ? 1u:0u;
} |
functions | void IsrBtn1Pressed_Disable(void)
{
/* Disable the general interrupt. */
*IsrBtn1Pressed_INTC_CLR_EN = IsrBtn1Pressed__INTC_MASK;
} |
functions | void IsrBtn1Pressed_SetPending(void)
{
*IsrBtn1Pressed_INTC_SET_PD = IsrBtn1Pressed__INTC_MASK;
} |
functions | void IsrBtn1Pressed_ClearPending(void)
{
*IsrBtn1Pressed_INTC_CLR_PD = IsrBtn1Pressed__INTC_MASK;
} |
includes |
#include <stdio.h> |
includes | #include <openssl/bn.h> |
includes | #include <openssl/dh.h> |
includes | #include <openssl/engine.h> |
functions | void DH_set_default_method(const DH_METHOD *meth)
{
default_DH_method = meth;
} |
functions | int DH_set_method(DH *dh, const DH_METHOD *meth)
{
/* NB: The caller is specifically setting a method, so it's not up to us
* to deal with which ENGINE it comes from. */
const DH_METHOD *mtmp;
mtmp = dh->meth;
if (mtmp->finish) mtmp->finish(dh);
#ifndef OPENSSL_NO_ENGINE
if (dh->eng... |
functions | OPENSSL_NO_ENGINE
if (engine)
{
if (!ENGINE_init(engine))
{
DHerr(DH_F_DH_NEW_METHOD, ERR_R_ENGINE_LIB);
OPENSSL_free(ret);
return NULL;
} |
functions | void DH_free(DH *r)
{
int i;
if(r == NULL) return;
i = CRYPTO_add(&r->references, -1, CRYPTO_LOCK_DH);
#ifdef REF_PRINT
REF_PRINT("DH",r);
#endif
if (i > 0) return;
#ifdef REF_CHECK
if (i < 0)
{
fprintf(stderr,"DH_free, bad reference count\n");
abort();
} |
functions | int DH_up_ref(DH *r)
{
int i = CRYPTO_add(&r->references, 1, CRYPTO_LOCK_DH);
#ifdef REF_PRINT
REF_PRINT("DH",r);
#endif
#ifdef REF_CHECK
if (i < 2)
{
fprintf(stderr, "DH_up, bad reference count\n");
abort();
} |
functions | int DH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func)
{
return CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_DH, argl, argp,
new_func, dup_func, free_func);
} |
functions | int DH_set_ex_data(DH *d, int idx, void *arg)
{
return(CRYPTO_set_ex_data(&d->ex_data,idx,arg));
} |
functions | int DH_size(const DH *dh)
{
return(BN_num_bytes(dh->p));
} |
includes |
#include <string.h> |
functions | mp_obj_t os_uname(void) {
return common_hal_os_uname();
} |
functions | mp_obj_t os_chdir(mp_obj_t path_in) {
const char *path = mp_obj_str_get_str(path_in);
common_hal_os_chdir(path);
return mp_const_none;
} |
functions | mp_obj_t os_getcwd(void) {
return common_hal_os_getcwd();
} |
functions | mp_obj_t os_listdir(size_t n_args, const mp_obj_t *args) {
const char* path;
if (n_args == 1) {
path = mp_obj_str_get_str(args[0]);
} |
functions | mp_obj_t os_mkdir(mp_obj_t path_in) {
const char *path = mp_obj_str_get_str(path_in);
common_hal_os_mkdir(path);
return mp_const_none;
} |
functions | mp_obj_t os_remove(mp_obj_t path_in) {
const char *path = mp_obj_str_get_str(path_in);
common_hal_os_remove(path);
return mp_const_none;
} |
functions | mp_obj_t os_rename(mp_obj_t old_path_in, mp_obj_t new_path_in) {
const char *old_path = mp_obj_str_get_str(old_path_in);
const char *new_path = mp_obj_str_get_str(new_path_in);
common_hal_os_rename(old_path, new_path);
return mp_const_none;
} |
functions | mp_obj_t os_rmdir(mp_obj_t path_in) {
const char *path = mp_obj_str_get_str(path_in);
common_hal_os_rmdir(path);
return mp_const_none;
} |
functions | mp_obj_t os_stat(mp_obj_t path_in) {
const char *path = mp_obj_str_get_str(path_in);
return common_hal_os_stat(path);
} |
functions | mp_obj_t os_statvfs(mp_obj_t path_in) {
const char *path = mp_obj_str_get_str(path_in);
return common_hal_os_statvfs(path);
} |
functions | mp_obj_t os_sync(void) {
for (mp_vfs_mount_t *vfs = MP_STATE_VM(vfs_mount_table); vfs != NULL; vfs = vfs->next) {
// this assumes that vfs->obj is fs_user_mount_t with block device functions
disk_ioctl(MP_OBJ_TO_PTR(vfs->obj), CTRL_SYNC, NULL);
} |
functions | mp_obj_t os_urandom(mp_obj_t size_in) {
mp_int_t size = mp_obj_get_int(size_in);
uint8_t tmp[size];
if (!common_hal_os_urandom(tmp, size)) {
mp_raise_NotImplementedError("");
} |
includes |
#include <stdio.h> |
functions | void mpeg3video_calc_mv(int *pred, int r_size, int motion_code, int motion_r, int full_pel_vector)
{
int lim = 16 << r_size;
int vec = full_pel_vector ? (*pred >> 1) : (*pred);
if(motion_code > 0)
{
vec += ((motion_code - 1) << r_size) + motion_r + 1;
if(vec >= lim) vec -= lim + lim;
} |
functions | else
if(motion_code < 0)
{
vec -= ((-motion_code - 1) << r_size) + motion_r + 1;
if(vec < -lim) vec += lim + lim;
} |
functions | void mpeg3video_calc_dmv(mpeg3video_t *video,
int DMV[][2],
int *dmvector,
int mvx,
int mvy)
{
if(video->pict_struct == FRAME_PICTURE)
{
if(video->topfirst)
{
/* vector for prediction of top field from bottom field */
DMV[0][0] = ((mvx + (mvx>0)) >> 1) + dmvector[0];
DMV[0][1] = ((mvy ... |
functions | int mpeg3video_get_mv(mpeg3_slice_t *slice)
{
int code;
mpeg3_slice_buffer_t *slice_buffer = slice->slice_buffer;
if(mpeg3slice_getbit(slice_buffer))
{
return 0;
} |
functions | int mpeg3video_get_dmv(mpeg3_slice_t *slice)
{
mpeg3_slice_buffer_t *slice_buffer = slice->slice_buffer;
if(mpeg3slice_getbit(slice_buffer))
{
return mpeg3slice_getbit(slice_buffer) ? -1 : 1;
} |
functions | void mpeg3video_motion_vector(mpeg3_slice_t *slice,
mpeg3video_t *video,
int *PMV,
int *dmvector,
int h_r_size,
int v_r_size,
int dmv,
int mvscale,
int full_pel_vector)
{
int motion_r;
int motion_code = mpeg3video_get_mv(slice);
mpeg3_slice_buffer_t *slice_buffer = slice->slice_buffer;
if(sli... |
functions | int mpeg3video_motion_vectors(mpeg3_slice_t *slice,
mpeg3video_t *video,
int PMV[2][2][2],
int dmvector[2],
int mv_field_sel[2][2],
int s,
int mv_count,
int mv_format,
int h_r_size,
int v_r_size,
int dmv,
int mvscale)
{
int result = 0;
mpeg3_slice_buffer_t *slice_buffer = slice->slice_b... |
includes | #include <string.h> |
functions | int WHIRLPOOL_Init (WHIRLPOOL_CTX *c)
{
memset (c,0,sizeof(*c));
return(1);
} |
functions | int WHIRLPOOL_Update (WHIRLPOOL_CTX *c,const void *_inp,size_t bytes)
{
/* Well, largest suitable chunk size actually is
* (1<<(sizeof(size_t)*8-3))-64, but below number
* is large enough for not to care about excessive
* calls to WHIRLPOOL_BitUpdate... */
size_t chunk = ((size_t)1)<<(sizeof(size_t)*8-4)... |
functions | void WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c,const void *_inp,size_t bits)
{
size_t n;
unsigned int bitoff = c->bitoff,
bitrem = bitoff%8,
inpgap = (8-(unsigned int)bits%8)&7;
const unsigned char *inp=_inp;
/* This 256-bit increment procedure relies on the size_t
* being natural size of CPU registe... |
functions | OPENSSL_SMALL_FOOTPRINT
if (bitrem==inpgap)
{
c->data[byteoff++] |= inp[0] & (0xff>>inpgap);
inpgap = 8-inpgap;
bitoff += inpgap; bitrem = 0; /* bitoff%8 */
bits -= inpgap; inpgap = 0; /* bits%8 */
inp++;
if (bitoff==WHIRLPOOL_BBLOCK)
{
whirlpool_block(c,c->data,... |
functions | endif
if (bits>=8)
{
b = ((inp[0]<<inpgap) | (inp[1]>>(8-inpgap)));
b &= 0xff;
if (bitrem) c->data[byteoff++] |= b>>bitrem;
else c->data[byteoff++] = b;
bitoff += 8;
bits -= 8;
inp++;
if (bitoff>=WHIRLPOOL_BBLOCK)
{
whirlpool_block(c,c->data,1);
by... |
functions | int WHIRLPOOL_Final (unsigned char *md,WHIRLPOOL_CTX *c)
{
unsigned int bitoff = c->bitoff,
byteoff = bitoff/8;
size_t i,j,v;
unsigned char *p;
bitoff %= 8;
if (bitoff) c->data[byteoff] |= 0x80>>bitoff;
else c->data[byteoff] = 0x80;
byteoff++;
/* pad with zeros */
if (byteoff > (WHIRLPO... |
defines |
#define BUFFER_SIZE 256 |
functions | BOOLEAN
AbValidateHeader (
ACPI_TABLE_HEADER *Header)
{
if (!AcpiUtValidNameseg (Header->Signature))
{
printf ("Header signature is invalid\n");
return (FALSE);
} |
functions | UINT8
AcpiTbSumTable (
void *Buffer,
UINT32 Length)
{
const UINT8 *Limit;
const UINT8 *Rover;
UINT8 Sum = 0;
if (Buffer && Length)
{
/* Buffer and Length are valid */
Limit = (UINT8 *) Buffer + L... |
functions | void
AbPrintHeaderInfo (
ACPI_TABLE_HEADER *Header)
{
/* Display header information */
printf ("Signature : %4.4s\n", Header->Signature);
printf ("Length : %8.8X\n", Header->Length);
printf ("Revision : %2.2X\n", Header->Revision);
printf ("Checksum ... |
functions | void
AbPrintHeadersInfo (
ACPI_TABLE_HEADER *Header,
ACPI_TABLE_HEADER *Header2)
{
/* Display header information for both headers */
printf ("Signature %8.4s : %4.4s\n", Header->Signature, Header2->Signature);
printf ("Length %8.8X : %8.8X\n", Header->Length,... |
functions | void
AbDisplayHeader (
char *FilePath)
{
UINT32 Actual;
FILE *File;
File = fopen (FilePath, "rb");
if (!File)
{
printf ("Could not open file %s\n", FilePath);
return;
} |
functions | void
AbComputeChecksum (
char *FilePath)
{
UINT32 Actual;
ACPI_TABLE_HEADER *Table;
UINT8 Checksum;
FILE *File;
File = fopen (FilePath, "rb");
if (!File)
{
printf ("Could not open file %s\n", FilePat... |
functions | int
AbCompareAmlFiles (
char *File1Path,
char *File2Path)
{
UINT32 Actual1;
UINT32 Actual2;
UINT32 Offset;
UINT8 Char1;
UINT8 Char2;
UINT8 Mismat... |
functions | else if (Actual2)
{
printf ("Error - file %s is shorter than file %s\n", File1Path, File2Path);
Mismatches++;
} |
functions | else if (!Mismatches)
{
if (HeaderMismatch)
{
printf ("Files compare exactly after header\n");
} |
functions | int
AbDumpAmlFile (
char *File1Path,
char *File2Path)
{
char *FileBuffer;
FILE *FileOutHandle;
UINT32 FileSize = 0;
int Status = -1;
/* Get the entire AML file, validate header ... |
includes |
#include <linux/time.h> |
includes | #include <linux/fs.h> |
includes | #include <linux/jbd2.h> |
includes | #include <linux/stat.h> |
includes | #include <linux/string.h> |
includes | #include <linux/quotaops.h> |
includes | #include <linux/buffer_head.h> |
includes | #include <linux/random.h> |
includes | #include <linux/bitops.h> |
includes | #include <linux/blkdev.h> |
includes | #include <linux/math64.h> |
includes | #include <asm/byteorder.h> |
includes |
#include <trace/events/ext4.h> |
defines |
#define free_block_ratio 10 |
structs | struct orlov_stats {
__u64 free_blocks;
__u32 free_inodes;
__u32 used_dirs;
}; |
functions | void ext4_mark_bitmap_end(int start_bit, int end_bit, char *bitmap)
{
int i;
if (start_bit >= end_bit)
return;
ext4_debug("mark end bits +%d through +%d used\n", start_bit, end_bit);
for (i = start_bit; i < ((start_bit + 7) & ~7UL); i++)
ext4_set_bit(i, bitmap);
if (i < end_bit)
memset(bitmap + (i >> 3), 0... |
functions | unsigned ext4_init_inode_bitmap(struct super_block *sb,
struct buffer_head *bh,
ext4_group_t block_group,
struct ext4_group_desc *gdp)
{
struct ext4_sb_info *sbi = EXT4_SB(sb);
J_ASSERT_BH(bh, buffer_locked(bh));
/* If checksum is bad mark all blocks and inodes use to prevent
* a... |
functions | void ext4_free_inode(handle_t *handle, struct inode *inode)
{
struct super_block *sb = inode->i_sb;
int is_directory;
unsigned long ino;
struct buffer_head *bitmap_bh = NULL;
struct buffer_head *bh2;
ext4_group_t block_group;
unsigned long bit;
struct ext4_group_desc *gdp;
struct ext4_super_block *es;
struct ... |
functions | int find_group_dir(struct super_block *sb, struct inode *parent,
ext4_group_t *best_group)
{
ext4_group_t ngroups = ext4_get_groups_count(sb);
unsigned int freei, avefreei;
struct ext4_group_desc *desc, *best_desc = NULL;
ext4_group_t group;
int ret = -1;
freei = percpu_counter_read_positive(&EXT4_SB(sb)->s_... |
functions | int find_group_flex(struct super_block *sb, struct inode *parent,
ext4_group_t *best_group)
{
struct ext4_sb_info *sbi = EXT4_SB(sb);
struct ext4_group_desc *desc;
struct flex_groups *flex_group = sbi->s_flex_groups;
ext4_group_t parent_group = EXT4_I(parent)->i_block_group;
ext4_group_t parent_fbg_group = e... |
functions | void get_orlov_stats(struct super_block *sb, ext4_group_t g,
int flex_size, struct orlov_stats *stats)
{
struct ext4_group_desc *desc;
struct flex_groups *flex_group = EXT4_SB(sb)->s_flex_groups;
if (flex_size > 1) {
stats->free_inodes = atomic_read(&flex_group[g].free_inodes);
stats->free_blocks = atomi... |
functions | int find_group_orlov(struct super_block *sb, struct inode *parent,
ext4_group_t *group, int mode,
const struct qstr *qstr)
{
ext4_group_t parent_group = EXT4_I(parent)->i_block_group;
struct ext4_sb_info *sbi = EXT4_SB(sb);
ext4_group_t real_ngroups = ext4_get_groups_count(sb);
int inodes_per_group = ... |
functions | int find_group_other(struct super_block *sb, struct inode *parent,
ext4_group_t *group, int mode)
{
ext4_group_t parent_group = EXT4_I(parent)->i_block_group;
ext4_group_t i, last, ngroups = ext4_get_groups_count(sb);
struct ext4_group_desc *desc;
int flex_size = ext4_flex_bg_size(EXT4_SB(sb));
/*
* Try ... |
functions | int ext4_claim_inode(struct super_block *sb,
struct buffer_head *inode_bitmap_bh,
unsigned long ino, ext4_group_t group, int mode)
{
int free = 0, retval = 0, count;
struct ext4_sb_info *sbi = EXT4_SB(sb);
struct ext4_group_info *grp = ext4_get_group_info(sb, group);
struct ext4_group_desc *gdp = ext4_get_gro... |
functions | long ext4_count_free_inodes(struct super_block *sb)
{
unsigned long desc_count;
struct ext4_group_desc *gdp;
ext4_group_t i, ngroups = ext4_get_groups_count(sb);
#ifdef EXT4FS_DEBUG
struct ext4_super_block *es;
unsigned long bitmap_count, x;
struct buffer_head *bitmap_bh = NULL;
es = EXT4_SB(sb)->s_es;
desc_co... |
functions | long ext4_count_dirs(struct super_block * sb)
{
unsigned long count = 0;
ext4_group_t i, ngroups = ext4_get_groups_count(sb);
for (i = 0; i < ngroups; i++) {
struct ext4_group_desc *gdp = ext4_get_group_desc(sb, i, NULL);
if (!gdp)
continue;
count += ext4_used_dirs_count(sb, gdp);
} |
functions | int ext4_init_inode_table(struct super_block *sb, ext4_group_t group,
int barrier)
{
struct ext4_group_info *grp = ext4_get_group_info(sb, group);
struct ext4_sb_info *sbi = EXT4_SB(sb);
struct ext4_group_desc *gdp = NULL;
struct buffer_head *group_desc_bh;
handle_t *handle;
ext4_fsblk_t blk;
int num, ret =... |
includes | #include <pjmedia/vid_stream.h> |
includes | #include <pjmedia/sdp_neg.h> |
includes | #include <pjmedia/stream_common.h> |
includes | #include <pj/ctype.h> |
includes | #include <pj/rand.h> |
functions | pj_status_t get_video_codec_info_param(pjmedia_vid_stream_info *si,
pj_pool_t *pool,
pjmedia_vid_codec_mgr *mgr,
const pjmedia_sdp_media *local_m,
const pjmedia_sdp_media *rem_m)
{
unsigned pt = 0;
const pjmedia_vid_codec_info *p_info;
pj_status_t status;
pt ... |
includes |
#include <linux/err.h> |
includes | #include <linux/init.h> |
includes | #include <linux/module.h> |
includes | #include <linux/mm.h> |
includes | #include <linux/slab.h> |
includes | #include <linux/scatterlist.h> |
includes | #include <linux/string.h> |
includes | #include <linux/crypto.h> |
includes | #include <linux/highmem.h> |
includes | #include <linux/moduleparam.h> |
includes | #include <linux/jiffies.h> |
includes | #include <linux/timex.h> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.