Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
qemu | cpu-all.h | static void cpu_print_cc(FILE *f,
int (*cpu_fprintf)(FILE *f, const char *fmt, ...),
uint32_t cc)
{
cpu_fprintf(f, "%c%c%c%c", cc & PSR_NEG ? 'N' : '-',
cc & PSR_ZERO ? 'Z' : '-', cc & PSR_OVF ? 'V' : '-',
cc & PSR_CARRY ? 'C' : '-');... | [
1,
0
] |
qemu | target-alpha/translate.c | static int cpu_restore_state_from_tb(CPUState *cpu, TranslationBlock *tb,
uintptr_t searched_pc)
{
CPUArchState *env = cpu->env_ptr;
TCGContext *s = &tcg_ctx;
int j;
uintptr_t tc_ptr;
#ifdef CONFIG_PROFILER
int64_t ti;
#endif
#ifdef CONFIG_PROFILER
ti = profil... | [
0,
0
] |
qemu | HACKING | static uint64_t pic_read(void *opaque, target_phys_addr_t addr,
unsigned size)
{
HeathrowPICS *s = opaque;
HeathrowPIC *pic;
unsigned int n;
uint32_t value;
n = ((addr & 0xfff) - 0x10) >> 4;
if (n >= 2) {
value = 0;
} else {
pic = &s->pics[n];
switch (addr ... | [
1,
0
] |
qemu | cpu-exec.c | static unsigned int dec_movs_r(DisasContext *dc)
{
TCGv t0;
int size = memsize_z(dc);
DIS(fprintf(logfile, "movs.%c $r%u, $r%u\n",
memsize_char(size),
dc->op1, dc->op2));
cris_cc_mask(dc, CC_MASK_NZ);
t0 = tcg_temp_new(TCG_TYPE_TL);
/* Size can only be qi or hi. */
t... | [
0,
0
] |
qemu | hw/i8254.c | void hpet_pit_disable(void) {
PITChannelState *s;
s = &pit_state.channels[0];
qemu_del_timer(s->irq_timer);
} | [
0,
0
] |
qemu | block/nbd-client.c | ssize_t nbd_wr_syncv(QIOChannel *ioc,
struct iovec *iov,
size_t niov,
size_t length,
bool do_read,
Error **errp)
{
ssize_t done = 0;
struct iovec *local_iov = g_new(struct iovec, niov);
struct iovec *... | [
1,
0
] |
qemu | kvm-all.c | int kvm_vcpu_ioctl(CPUState *env, int type, ...)
{
int ret;
void *arg;
va_list ap;
va_start(ap, type);
arg = va_arg(ap, void *);
va_end(ap);
ret = ioctl(env->kvm_fd, type, arg);
if (ret == -1)
ret = -errno;
return ret;
} | [
0,
0
] |
qemu | hw/audio/intel-hda.c | static void intel_hda_realize(PCIDevice *pci, Error **errp)
{
IntelHDAState *d = INTEL_HDA(pci);
uint8_t *conf = d->pci.config;
d->name = object_get_typename(OBJECT(d));
pci_config_set_interrupt_pin(conf, 1);
/* HDCTL off 0x40 bit 0 selects signaling mode (1-HDA, 0 - Ac97) 18.1.19 */
conf[0x40] = 0x0... | [
1,
1
] |
qemu | ui/vnc-enc-tight.c | static int tight_compress_data(VncState *vs, int stream_id, size_t bytes,
int level, int strategy)
{
z_streamp zstream = &vs->tight.stream[stream_id];
int previous_out;
if (bytes < VNC_TIGHT_MIN_TO_COMPRESS) {
vnc_write(vs, vs->tight.tight.buffer, vs->tight.tight.offset);
... | [
1,
0
] |
FFmpeg | libavcodec/qsvenc.c | static int encode_frame(AVCodecContext *avctx, QSVEncContext *q,
const AVFrame *frame)
{
AVPacket new_pkt = {0};
mfxBitstream *bs;
mfxFrameSurface1 *surf = NULL;
mfxSyncPoint sync = NULL;
int ret;
if (frame) {
ret = submit_frame(q, frame, &surf);
if (ret < 0) {
... | [
1,
0
] |
qemu | target-ppc/cpu.h | void do_load_fpscr(void)
{
/* The 32 MSB of the target fpr are undefined.
* They'll be zero...
*/
union {
float64 d;
struct {
uint32_t u[2];
} s;
} u;
int i;
#ifdef WORDS_BIGENDIAN
#define WORD0 0
#define WORD1 1
#else
#define WORD0 1
#define WORD1 0
#endif
u.s.u[WOR... | [
1,
0
] |
FFmpeg | libavcodec/4xm.c | static void decode_init_vlc(H264Context *h) {
static int done = 0;
if (!done) {
int i;
done = 1;
init_vlc(&chroma_dc_coeff_token_vlc, CHROMA_DC_COEFF_TOKEN_VLC_BITS, 4 * 5,
&chroma_dc_coeff_token_len[0], 1, 1,
&chroma_dc_coeff_token_bits[0], 1, 1);
for (i = 0; i < 4... | [
1,
0
] |
qemu | darwin-user/main.c | static inline void RET_STOP(DisasContext *ctx)
{
gen_update_nip(ctx, ctx->nip);
ctx->exception = EXCP_MTMSR;
} | [
0,
0
] |
qemu | block/qcow.c | static int qcow2_is_allocated(BlockDriverState *bs, int64_t sector_num,
int nb_sectors, int *pnum)
{
uint64_t cluster_offset;
int ret;
*pnum = nb_sectors;
/* FIXME We can get errors here, but the bdrv_is_allocated interface can't
* pass them on today */
ret = qcow2_get... | [
0,
1
] |
qemu | hw/qdev.c | void qdev_property_add_legacy(DeviceState *dev, Property *prop,
Error **errp)
{
gchar *type;
type = g_strdup_printf("legacy<%s>", prop->info->name);
qdev_property_add(dev, prop->name, type,
qdev_get_legacy_property,
qdev_set_legacy_prope... | [
1,
0
] |
qemu | tcg/aarch64/tcg-target.inc.c | static void tcg_out_andi64(TCGContext *s, TCGReg dst, TCGReg src, uint64_t c)
{
int mb, me;
assert(TCG_TARGET_REG_BITS == 64);
if (mask64_operand(c, &mb, &me)) {
if (mb == 0) {
tcg_out_rld(s, RLDICR, dst, src, 0, me);
} else {
tcg_out_rld(s, RLDICL, dst, src, 0, mb);
}
} else if... | [
0,
0
] |
qemu | hw/net/allwinner_emac.c | static void eth_cleanup(NetClientState *nc)
{
ETRAXFSEthState *eth = qemu_get_nic_opaque(nc);
/* Disconnect the client. */
eth->dma_out->client.push = NULL;
eth->dma_out->client.opaque = NULL;
eth->dma_in->client.opaque = NULL;
eth->dma_in->client.pull = NULL;
g_free(eth);
} | [
0,
0
] |
qemu | Makefile.objs | static inline int epoll_events_from_pfd(int pfd_events)
{
return (pfd_events & G_IO_IN ? EPOLLIN : 0) |
(pfd_events & G_IO_OUT ? EPOLLOUT : 0) |
(pfd_events & G_IO_HUP ? EPOLLHUP : 0) |
(pfd_events & G_IO_ERR ? EPOLLERR : 0);
} | [
0,
0
] |
qemu | audio/audio.h | static void qerror_set_data(QError *qerr, const char *fmt, va_list *va)
{
QObject *obj;
obj = qobject_from_jsonv(fmt, va);
if (!obj) {
qerror_abort(qerr, "invalid format '%s'", fmt);
}
if (qobject_type(obj) != QTYPE_QDICT) {
qerror_abort(qerr, "error format is not a QDict '%s'", fmt);
}
qe... | [
0,
0
] |
qemu | block.c | bool bdrv_op_is_blocked(BlockDriverState *bs, BlockOpType op, Error **errp)
{
BdrvOpBlocker *blocker;
assert((int)op >= 0 && op < BLOCK_OP_TYPE_MAX);
if (!QLIST_EMPTY(&bs->op_blockers[op])) {
blocker = QLIST_FIRST(&bs->op_blockers[op]);
if (errp) {
*errp = error_copy(blocker->reason);
... | [
1,
0
] |
qemu | hw/s390-virtio-bus.c | static uint32_t virtio_blk_get_features(VirtIODevice *vdev)
{
VirtIOBlock *s = to_virtio_blk(vdev);
uint32_t features = 0;
features |= (1 << VIRTIO_BLK_F_SEG_MAX);
features |= (1 << VIRTIO_BLK_F_GEOMETRY);
if (bdrv_enable_write_cache(s->bs))
features |= (1 << VIRTIO_BLK_F_WCACHE);
#ifdef __linux__... | [
0,
0
] |
qemu | include/char/char.h | static void qemu_chr_fire_open_event(void *opaque)
{
CharDriverState *s = opaque;
qemu_chr_be_event(s, CHR_EVENT_OPENED);
qemu_free_timer(s->open_timer);
s->open_timer = NULL;
} | [
0,
0
] |
qemu | block/sheepdog.c | static int sd_snapshot_goto(BlockDriverState *bs, const char *snapshot_id)
{
BDRVSheepdogState *s = bs->opaque;
BDRVSheepdogState *old_s;
char vdi[SD_MAX_VDI_LEN], tag[SD_MAX_VDI_TAG_LEN];
char *buf = NULL;
uint32_t vid;
uint32_t snapid = 0;
int ret = 0, fd;
old_s = g_malloc(sizeof(BDRVSheepdog... | [
1,
0
] |
qemu | Makefile.objs | static bool run_poll_handlers_once(AioContext *ctx)
{
bool progress = false;
AioHandler *node;
QLIST_FOREACH_RCU(node, &ctx->aio_handlers, node) {
if (!node->deleted && node->io_poll &&
aio_node_check(ctx, node->is_external) &&
node->io_poll(node->opaque)) {
progress = true;
... | [
1,
0
] |
qemu | hw/ppc/spapr_hcall.c | void ppc_store_sdr1(CPUPPCState *env, target_ulong value)
{
qemu_log_mask(CPU_LOG_MMU, "%s: " TARGET_FMT_lx "\n", __func__, value);
assert(!env->external_htab);
env->spr[SPR_SDR1] = value;
#if defined(TARGET_PPC64)
if (env->mmu_model & POWERPC_MMU_64) {
PowerPCCPU *cpu = ppc_env_get_cpu(env);
Er... | [
1,
1
] |
qemu | hw/core/qdev-properties.c | static void isa_ipmi_bmc_check(Object *obj, const char *name,
Object *val, Error **errp)
{
IPMIBmc *bmc = IPMI_BMC(val);
if (bmc->intf)
error_setg(errp, "BMC object is already in use");
} | [
1,
0
] |
qemu | target-ppc/excp_helper.c | static void gen_dst(DisasContext *ctx)
{
if (rA(ctx->opcode) == 0) {
gen_inval_exception(ctx, POWERPC_EXCP_INVAL_LSWX);
} else {
/* interpreted as no-op */
}
} | [
1,
0
] |
qemu | target-i386/cpu.c | static void x86_cpu_enable_xsave_components(X86CPU *cpu)
{
CPUX86State *env = &cpu->env;
int i;
if (!(env->features[FEAT_1_ECX] & CPUID_EXT_XSAVE)) {
return;
}
env->xsave_components = (XSTATE_FP_MASK | XSTATE_SSE_MASK);
for (i = 2; i < ARRAY_SIZE(x86_ext_save_areas); i++) {
const ExtSaveArea... | [
1,
0
] |
qemu | hw/pci.c | static void pci_device_reset(PCIDevice *dev)
{
int r;
dev->irq_state = 0;
pci_update_irq_status(dev);
/* Clear all writeable bits */
pci_word_test_and_clear_mask(dev->config + PCI_COMMAND,
pci_get_word(dev->wmask + PCI_COMMAND));
dev->config[PCI_CACHE_LINE_SIZE] = 0x0;... | [
1,
0
] |
qemu | hw/input/hid.c | static void hmp_mouse_move(Monitor *mon, const QDict *qdict)
{
int dx, dy, dz, button;
const char *dx_str = qdict_get_str(qdict, "dx_str");
const char *dy_str = qdict_get_str(qdict, "dy_str");
const char *dz_str = qdict_get_try_str(qdict, "dz_str");
dx = strtol(dx_str, NULL, 0);
dy = strtol(dy_str, N... | [
0,
0
] |
qemu | backends/baum.c | static CharDriverState *qmp_chardev_open_file(const char *id,
ChardevBackend *backend,
ChardevReturn *ret,
Error **errp)
{
ChardevFile *file = backend->u.file;
ChardevCommo... | [
0,
0
] |
qemu | backends/baum.c | static CharDriverState *qemu_chr_open_ringbuf(const char *id,
ChardevBackend *backend,
ChardevReturn *ret,
Error **errp)
{
ChardevRingbuf *opts = backend->u.ringbuf;
CharDr... | [
0,
0
] |
qemu | target/i386/arch_dump.c | int cpu_get_dump_info(ArchDumpInfo *info,
const GuestPhysBlockList *guest_phys_blocks)
{
bool lma = false;
GuestPhysBlock *block;
#ifdef TARGET_X86_64
X86CPU *first_x86_cpu = X86_CPU(first_cpu);
lma = !!(first_x86_cpu->env.hflags & HF_LMA_MASK);
#endif
if (lma) {
info->d_ma... | [
0,
0
] |
qemu | monitor.c | static void handler_audit(Monitor *mon, const mon_cmd_t *cmd, int ret)
{
if (ret && !monitor_has_error(mon)) {
/*
* If it returns failure, it must have passed on error.
*
* Action: Report an internal error to the client if in QMP.
*/
if (monitor_ctrl_mode(mon)) {
qerror_repo... | [
1,
1
] |
qemu | tests/test-cutils.c | static void test_qemu_strtoul_negative(void)
{
const char *str = " \t -321";
char f = 'X';
const char *endptr = &f;
unsigned long res = 999;
int err;
err = qemu_strtoul(str, &endptr, 0, &res);
g_assert_cmpint(err, ==, 0);
g_assert_cmpint(res, ==, -321ul);
g_assert(endptr == str + strlen(str... | [
1,
0
] |
FFmpeg | libavcodec/huffyuv.c | static void generate_len_table(uint8_t *dst, uint64_t *stats, int size) {
heap_elem_t h[size];
int up[2 * size];
int len[2 * size];
int offset, i, next;
for (offset = 1;; offset <<= 1) {
for (i = 0; i < size; i++) {
h[i].name = i;
h[i].val = (stats[i] << 8) + offset;
}
for (i ... | [
1,
0
] |
qemu | hw/pci_bridge.c | void pci_bridge_reset_reg(PCIDevice *dev)
{
uint8_t *conf = dev->config;
conf[PCI_PRIMARY_BUS] = 0;
conf[PCI_SECONDARY_BUS] = 0;
conf[PCI_SUBORDINATE_BUS] = 0;
conf[PCI_SEC_LATENCY_TIMER] = 0;
conf[PCI_IO_BASE] = 0;
conf[PCI_IO_LIMIT] = 0;
pci_set_word(conf + PCI_MEMORY_BASE, 0);
pci_set_wor... | [
1,
0
] |
qemu | hw/i2c/core.c | int i2c_start_transfer(I2CBus *bus, uint8_t address, int recv)
{
BusChild *kid;
I2CSlaveClass *sc;
I2CNode *node;
if (address == 0x00) {
/*
* This is a broadcast, the current_devs will be all the devices of the
* bus.
*/
bus->broadcast = true;
}
QTAILQ_FOREACH(kid, &bus->qb... | [
1,
1
] |
qemu | kvm-all.c | static int kvm_client_sync_dirty_bitmap(struct CPUPhysMemoryClient *client,
target_phys_addr_t start_addr,
target_phys_addr_t end_addr)
{
return kvm_physical_sync_dirty_bitmap(start_addr, end_addr);
} | [
1,
0
] |
qemu | block/mirror.c | static inline int mirror_clip_sectors(MirrorBlockJob *s,
int64_t sector_num,
int nb_sectors)
{
return MIN(nb_sectors,
s->bdev_length / BDRV_SECTOR_SIZE - sector_num);
} | [
0,
0
] |
qemu | qom/object.c | ObjectClass *object_class_dynamic_cast(ObjectClass *class,
const char *typename)
{
TypeImpl *target_type = type_get_by_name(typename);
TypeImpl *type = class->type;
ObjectClass *ret = NULL;
if (type->num_interfaces && type_is_ancestor(target_type, type_interface)) {
... | [
0,
0
] |
qemu | util/qemu-option.c | const char *qemu_opt_get(QemuOpts *opts, const char *name)
{
QemuOpt *opt = qemu_opt_find(opts, name);
if (!opt) {
const QemuOptDesc *desc = find_desc_by_name(opts->list->desc, name);
if (desc && desc->def_value_str) {
return desc->def_value_str;
}
}
return opt ? opt->str : NULL;
} | [
1,
0
] |
qemu | block.c | void bdrv_debug_event(BlockDriverState *bs, BlkDebugEvent event)
{
if (!bs || !bs->drv || !bs->drv->bdrv_debug_event) {
return;
}
bs->drv->bdrv_debug_event(bs, event);
} | [
1,
0
] |
qemu | Makefile | static void raw_aio_cancel(BlockDriverAIOCB *blockacb)
{
int ret;
RawAIOCB *acb = (RawAIOCB *)blockacb;
RawAIOCB **pacb;
ret = aio_cancel(acb->aiocb.aio_fildes, &acb->aiocb);
if (ret == AIO_NOTCANCELED) {
/* fail safe: if the aio could not be canceled, we wait for
it */
while (aio_erro... | [
0,
0
] |
qemu | hw/sh7750_regs.h | void check_file_fixed_eof_mmaps(void)
{
char *addr;
char *cp;
unsigned int *p1;
uintptr_t p;
int i;
/* Find a suitable address to start with. */
addr = mmap(NULL, pagesize * 44, PROT_READ,
MAP_PRIVATE | MAP_ANONYMOUS,
-1, 0);
fprintf(stderr, "%s addr=%p", __func__... | [
1,
0
] |
qemu | hw/ide/pci.c | void bmdma_cmd_writeb(void *opaque, uint32_t addr, uint32_t val)
{
BMDMAState *bm = opaque;
#ifdef DEBUG_IDE
printf("%s: 0x%08x\n", __func__, val);
#endif
/* Ignore writes to SSBM if it keeps the old value */
if ((val & BM_CMD_START) != (bm->cmd & BM_CMD_START)) {
if (!(val & BM_CMD_START)) {
... | [
1,
0
] |
qemu | device_tree.c | uint32_t qemu_devtree_get_phandle(void *fdt, const char *path)
{
uint32_t r;
r = fdt_get_phandle(fdt, findnode_nofail(fdt, path));
if (r <= 0) {
fprintf(stderr, "%s: Couldn't get phandle for %s: %s\n", __func__,
path, fdt_strerror(r));
exit(1);
}
return r;
} | [
0,
0
] |
qemu | hw/intc/arm_gic.c | static MemTxResult gic_cpu_write(GICState *s, int cpu, int offset,
uint32_t value, MemTxAttrs attrs)
{
switch (offset) {
case 0x00: /* Control */
gic_set_cpu_control(s, cpu, value, attrs);
break;
case 0x04: /* Priority mask */
s->priority_mask[cpu] = (value & 0... | [
1,
0
] |
qemu | hw/9pfs/Makefile.objs | static void v9fs_synth_fill_statbuf(V9fsSynthNode *node, struct stat *stbuf)
{
stbuf->st_dev = 0;
stbuf->st_ino = node->attr->inode;
stbuf->st_mode = node->attr->mode;
stbuf->st_nlink = node->attr->nlink;
stbuf->st_uid = 0;
stbuf->st_gid = 0;
stbuf->st_rdev = 0;
stbuf->st_size = 0;
stbuf->st... | [
0,
0
] |
qemu | acl.c | void cpu_exec_init(CPUState *env)
{
CPUState **penv;
int cpu_index;
#if defined(CONFIG_USER_ONLY)
cpu_list_lock();
#endif
env->next_cpu = NULL;
penv = &first_cpu;
cpu_index = 0;
while (*penv != NULL) {
penv = &(*penv)->next_cpu;
cpu_index++;
}
env->cpu_index = cpu_index;
env->n... | [
0,
0
] |
qemu | block/qapi.c | BlockStatsList *qmp_query_blockstats(Error **errp) {
BlockStatsList *head = NULL, **p_next = &head;
BlockDriverState *bs = NULL;
while ((bs = bdrv_next(bs))) {
BlockStatsList *info = g_malloc0(sizeof(*info));
info->value = bdrv_query_stats(bs);
*p_next = info;
p_next = &info->next;
}
return he... | [
1,
0
] |
qemu | migration/ram.c | static bool find_dirty_block(RAMState *rs, PageSearchStatus *pss,
bool *again, ram_addr_t *ram_addr_abs)
{
pss->offset = migration_bitmap_find_dirty(rs, pss->block, pss->offset,
ram_addr_abs);
if (pss->complete_round && pss->block == rs->... | [
1,
0
] |
qemu | hmp.c | int object_property_get_enum(Object *obj, const char *name,
const char *strings[], Error **errp)
{
StringOutputVisitor *sov;
StringInputVisitor *siv;
int ret;
sov = string_output_visitor_new(false);
object_property_get(obj, string_output_get_visitor(sov), name, errp);
si... | [
1,
0
] |
qemu | hw/scsi/vhost-scsi.c | int virtio_scsi_common_exit(VirtIOSCSICommon *vs)
{
VirtIODevice *vdev = VIRTIO_DEVICE(vs);
g_free(vs->cmd_vqs);
virtio_cleanup(vdev);
return 0;
} | [
1,
0
] |
FFmpeg | libavcodec/alac.c | static int allocate_buffers(ALACContext *alac)
{
int ch;
for (ch = 0; ch < FFMIN(alac->channels, 2); ch++) {
int buf_size = alac->max_samples_per_frame * sizeof(int32_t);
FF_ALLOC_OR_GOTO(alac->avctx, alac->predict_error_buffer[ch],
buf_size, buf_alloc_fail);
if (alac->sample... | [
1,
0
] |
FFmpeg | libavcodec/j2k.c | static int put_cod(Jpeg2000EncoderContext *s)
{
Jpeg2000CodingStyle *codsty = &s->codsty;
if (s->buf_end - s->buf < 14)
return -1;
bytestream_put_be16(&s->buf, JPEG2000_COD);
bytestream_put_be16(&s->buf, 12); // Lcod
bytestream_put_byte(&s->buf, 0); // Scod
// SGcod
bytestream_put_byte(&s->bu... | [
1,
0
] |
FFmpeg | ffmpeg.c | static void opt_pad_color(const char *arg) {
/* Input is expected to be six hex digits similar to
how colors are expressed in html tags (but without the #) */
int rgb = strtol(arg, NULL, 16);
int r, g, b;
r = (rgb >> 16);
g = ((rgb >> 8) & 255);
b = (rgb & 255);
padcolor[0] = RGB_TO_Y(r, g, b... | [
0,
0
] |
qemu | target-ppc/translate_init.c | static void gen_spr_74xx(CPUPPCState *env)
{
/* Processor identification */
spr_register(env, SPR_PIR, "PIR",
SPR_NOACCESS, SPR_NOACCESS,
&spr_read_generic, &spr_write_pir,
0x00000000);
/* XXX : not implemented */
spr_register(env, SPR_MMCR2, "MMCR2",
... | [
1,
1
] |
qemu | hw/ppc/spapr_pci.c | static int spapr_msicfg_find(sPAPRPHBState *phb, uint32_t config_addr,
bool alloc_new)
{
int i;
for (i = 0; i < SPAPR_MSIX_MAX_DEVS; ++i) {
if (!phb->msi_table[i].nvec) {
break;
}
if (phb->msi_table[i].config_addr == config_addr) {
return i;
}
}
... | [
1,
0
] |
FFmpeg | libavcodec/h264_loopfilter.c | static void av_always_inline filter_mb_edgecv(uint8_t *pix, int stride,
const int16_t bS[4],
unsigned int qp, H264Context *h) {
const int qp_bd_offset = 6 * (h->sps.bit_depth_luma - 8);
const unsigned int index_a = qp - qp... | [
1,
0
] |
FFmpeg | libavcodec/xan.c | static int xan_decode_end(AVCodecContext *avctx)
{
XanContext *s = avctx->priv_data;
/* release the last frame */
avctx->release_buffer(avctx, &s->last_frame);
av_free(s->buffer1);
av_free(s->buffer2);
return 0;
} | [
0,
0
] |
qemu | hw/file-op-9p.h | static int v9fs_do_mknod(V9fsState *s, V9fsString *path, mode_t mode, dev_t dev)
{
return s->ops->mknod(&s->ctx, path->data, mode, dev);
} | [
0,
0
] |
qemu | HACKING | static uint64_t g364fb_ctrl_read(void *opaque,
target_phys_addr_t addr,
unsigned int size)
{
G364State *s = opaque;
uint32_t val;
if (addr >= REG_CURS_PAT && addr < REG_CURS_PAT + 0x1000) {
/* cursor pattern */
int idx = (addr - REG... | [
1,
0
] |
qemu | hw/ppc/e500.c | static void ppce500_reset_device_tree(void *opaque)
{
DeviceTreeParams *p = opaque;
ppce500_load_device_tree(p->machine, &p->params, p->addr, p->initrd_base,
p->initrd_size, false);
} | [
0,
0
] |
qemu | configure | static void vncws_send_handshake_response(VncState *vs, const char *key)
{
char combined_key[WS_CLIENT_KEY_LEN + WS_GUID_LEN + 1];
unsigned char hash[SHA1_DIGEST_LEN];
size_t hash_size = sizeof(hash);
char *accept = NULL, *response = NULL;
gnutls_datum_t in;
int ret;
g_strlcpy(combined_key, key, W... | [
1,
0
] |
qemu | hw/pxa2xx.c | static void spitz_init(int ram_size, int vga_ram_size, int boot_device,
DisplayState *ds, const char **fd_filename, int snapshot,
const char *kernel_filename, const char *kernel_cmdline,
const char *initrd_filename, const char *cpu_model)
{
spi... | [
0,
0
] |
qemu | block/iscsi.c | iscsi_aio_write16_cb(struct iscsi_context *iscsi, int status,
void *command_data, void *opaque)
{
IscsiAIOCB *acb = opaque;
trace_iscsi_aio_write16_cb(iscsi, status, acb, acb->canceled);
g_free(acb->buf);
if (acb->canceled != 0) {
qemu_aio_release(acb);
scsi_free_scsi_task(a... | [
1,
0
] |
qemu | vl.c | static void ram_decompress_close(RamDecompressState *s)
{
inflateEnd(&s->zstream);
} | [
1,
0
] |
qemu | hw/scsi-disk.c | static inline bool check_lba_range(SCSIDiskState *s,
uint64_t sector_num, uint32_t nb_sectors)
{
/*
* The first line tests that no overflow happens when computing the last
* sector. The second line tests that the last accessed sector is in
* range.
*/
return (... | [
1,
0
] |
FFmpeg | libavcodec/vmdav.c | static av_cold int vmdaudio_decode_init(AVCodecContext *avctx)
{
VmdAudioContext *s = avctx->priv_data;
if (avctx->channels < 1 || avctx->channels > 2) {
av_log(avctx, AV_LOG_ERROR, "invalid number of channels\n");
return AVERROR(EINVAL);
}
if (avctx->block_align < 1) {
av_log(avctx, AV_LOG_E... | [
1,
0
] |
FFmpeg | libavformat/4xm.c | static int apc_probe(AVProbeData *p)
{
if (p->buf_size < 8)
return 0;
if (!strncmp(p->buf, "CRYO_APC", 8))
return AVPROBE_SCORE_MAX;
return 0;
} | [
0,
0
] |
qemu | cpu-exec.c | static void *qemu_dummy_cpu_thread_fn(void *arg)
{
#ifdef _WIN32
fprintf(stderr, "qtest is not supported under Windows\n");
exit(1);
#else
CPUState *cpu = arg;
sigset_t waitset;
int r;
rcu_register_thread();
qemu_mutex_lock_iothread();
qemu_thread_get_self(cpu->thread);
cpu->thread_id = qe... | [
1,
0
] |
qemu | hw/9pfs/9p.c | static void coroutine_fn v9fs_fix_fid_paths(V9fsPDU *pdu, V9fsPath *olddir,
V9fsString *old_name,
V9fsPath *newdir,
V9fsString *new_name)
{
V9fsFidState *tfidp;
V9fsPath oldpath,... | [
1,
0
] |
FFmpeg | libavcodec/rv34dsp.h | static inline void
rv40_weak_loop_filter(uint8_t *src, const int step,
const int filter_p1, const int filter_q1,
const int alpha, const int beta,
const int lim_p0q0,
const int lim_q1, const int lim_p1,
con... | [
1,
0
] |
FFmpeg | libavcodec/mips/h264dsp_msa.c | void ff_biweight_h264_pixels4_8_msa(uint8_t *dst, uint8_t *src,
int stride, int height,
int log2_denom, int weight_dst,
int weight_src, int offset)
{
avc_biwgt_4width_msa(src, stride,
... | [
0,
0
] |
FFmpeg | configure | void clear_blocks_dcbz128_ppc(DCTELEM *blocks)
{
POWERPC_TBL_DECLARE(powerpc_clear_blocks_dcbz128, 1);
register int misal = ((unsigned long)blocks & 0x0000007f);
register int i = 0;
POWERPC_TBL_START_COUNT(powerpc_clear_blocks_dcbz128, 1);
#if 1
if (misal) {
// we could probably also optimize this... | [
1,
0
] |
qemu | target-mips/cpu.h | static void mvp_init(CPUMIPSState *env, const mips_def_t *def)
{
env->mvp = g_malloc0(sizeof(CPUMIPSMVPContext));
/* MVPConf1 implemented, TLB sharable, no gating storage support,
programmable cache partitioning implemented, number of allocatable
and sharable TLB entries, MVP has allocatable TCs, 2 V... | [
1,
1
] |
FFmpeg | libavcodec/4xm.c | void ff_h261_encode_init(MpegEncContext *s) {
static int done = 0;
if (!done) {
done = 1;
init_rl(&h261_rl_tcoeff);
}
s->min_qcoeff = -127;
s->max_qcoeff = 127;
s->y_dc_scale_table =
s->c_dc_scale_table = ff_mpeg1_dc_scale_table;
} | [
1,
0
] |
qemu | hw/i386/xen/xen-hvm.c | static int qemu_reset_requested(void)
{
int r = reset_requested;
if (r && replay_checkpoint(CHECKPOINT_RESET_REQUESTED)) {
reset_requested = 0;
return r;
}
return false;
} | [
1,
0
] |
qemu | hw/vfio/platform.c | static void vfio_platform_eoi(VFIODevice *vbasedev)
{
VFIOINTp *intp;
VFIOPlatformDevice *vdev =
container_of(vbasedev, VFIOPlatformDevice, vbasedev);
qemu_mutex_lock(&vdev->intp_mutex);
QLIST_FOREACH(intp, &vdev->intp_list, next) {
if (intp->state == VFIO_IRQ_ACTIVE) {
trace_vfio_platfo... | [
1,
0
] |
FFmpeg | libavformat/mov.c | static int mov_read_smi(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
AVStream *st;
if (c->fc->nb_streams < 1)
return 0;
st = c->fc->streams[c->fc->nb_streams - 1];
if ((uint64_t)atom.size > (1 << 30))
return AVERROR_INVALIDDATA;
// currently SVQ3 decoder expect full STSD header - so let's f... | [
1,
0
] |
qemu | Makefile.objs | int vnc_zlib_send_framebuffer_update(VncState *vs, int x, int y, int w, int h)
{
int old_offset, new_offset, bytes_written;
vnc_framebuffer_update(vs, x, y, w, h, VNC_ENCODING_ZLIB);
// remember where we put in the follow-up size
old_offset = vs->output.offset;
vnc_write_s32(vs, 0);
// compress the s... | [
0,
1
] |
qemu | hw/hpet.c | static void pci_piix_init_ports(PCIIDEState *d) {
int i;
struct {
int iobase;
int iobase2;
int isairq;
} port_info[] = {
{0x1f0, 0x3f6, 14},
{0x170, 0x376, 15},
};
for (i = 0; i < 2; i++) {
ide_bus_new(&d->bus[i], &d->dev.qdev, i);
ide_init_ioport(&d->bus[i], port_i... | [
0,
0
] |
qemu | hw/s390x/css.c | static int s390_virtio_device_init(VirtIOS390Device *dev, VirtIODevice *vdev)
{
VirtIOS390Bus *bus;
int dev_len;
bus = DO_UPCAST(VirtIOS390Bus, bus, dev->qdev.parent_bus);
dev->vdev = vdev;
dev->dev_offs = bus->dev_offs;
dev->feat_len = sizeof(uint32_t); /* always keep 32 bits features */
dev_len ... | [
1,
0
] |
qemu | op-i386.c | void load_seg(int seg_reg, int selector)
{
SegmentCache *sc;
SegmentDescriptorTable *dt;
int index;
uint32_t e1, e2;
uint8_t *ptr;
env->segs[seg_reg] = selector;
sc = &env->seg_cache[seg_reg];
if (env->eflags & VM_MASK) {
sc->base = (void *)(selector << 4);
sc->limit = 0xffff;
sc... | [
1,
1
] |
qemu | docs/qapi-code-gen.txt | static QObject *qmp_input_get_object(QmpInputVisitor *qiv,
const char *name,
bool consume, Error **errp)
{
StackObject *tos;
QObject *qobj;
QObject *ret;
if (QSLIST_EMPTY(&qiv->stack)) {
/* Starting at root, name is ignored. *... | [
0,
0
] |
qemu | hw/ppc/spapr_pci.c | static void rtas_ibm_set_slot_reset(PowerPCCPU *cpu,
sPAPREnvironment *spapr,
uint32_t token, uint32_t nargs,
target_ulong args, uint32_t nret,
target_ulong rets)
{
sPA... | [
1,
0
] |
qemu | target-ppc/cpu.h | int pp_check(int key, int pp, int nx)
{
int access;
/* Compute access rights */
/* When pp is 3/7, the result is undefined. Set it to noaccess */
access = 0;
if (key == 0) {
switch (pp) {
case 0x0:
case 0x1:
case 0x2:
access |= PAGE_WRITE;
/* No break here */
case ... | [
1,
0
] |
qemu | exec.c | RAMBlock *qemu_ram_alloc_internal(ram_addr_t size, ram_addr_t max_size,
void (*resized)(const char *,
uint64_t length,
void *host),
void *host, bool... | [
0,
0
] |
qemu | hw/usb-ehci.c | static int ehci_state_fetchsitd(EHCIState *ehci, int async)
{
uint32_t entry;
EHCIsitd sitd;
assert(!async);
entry = ehci_get_fetch_addr(ehci, async);
get_dwords(NLPTR_GET(entry), (uint32_t *)&sitd,
sizeof(EHCIsitd) >> 2);
ehci_trace_sitd(ehci, entry, &sitd);
if (!(sitd.results & SIT... | [
1,
1
] |
qemu | HACKING | static struct omap_pwt_s *omap_pwt_init(MemoryRegion *system_memory,
target_phys_addr_t base,
omap_clk clk)
{
struct omap_pwt_s *s = g_malloc0(sizeof(*s));
s->clk = clk;
omap_pwt_reset(s);
memory_region_init_io(&s->iomem, &om... | [
0,
0
] |
FFmpeg | libavcodec/h264.c | static void free_tables(H264Context *h) {
int i;
H264Context *hx;
av_freep(&h->intra4x4_pred_mode);
av_freep(&h->chroma_pred_mode_table);
av_freep(&h->cbp_table);
av_freep(&h->mvd_table[0]);
av_freep(&h->mvd_table[1]);
av_freep(&h->direct_table);
av_freep(&h->non_zero_count);
av_freep(&h->... | [
1,
0
] |
FFmpeg | libav/swf.c | static int swf_write_trailer(AVFormatContext *s)
{
SWFContext *swf = s->priv_data;
ByteIOContext *pb = &s->pb;
AVCodecContext *enc, *video_enc;
int file_size, i;
video_enc = NULL;
for (i = 0; i < s->nb_streams; i++) {
enc = &s->streams[i]->codec;
if (enc->codec_type == CODEC_TYPE_VIDEO)
... | [
1,
0
] |
FFmpeg | libavcodec/mpegaudiodsp.c | av_cold void ff_mpadsp_init(MPADSPContext *s)
{
DCTContext dct;
ff_dct_init(&dct, 5, DCT_II);
ff_init_mpadsp_tabs_float();
ff_init_mpadsp_tabs_fixed();
s->apply_window_float = ff_mpadsp_apply_window_float;
s->apply_window_fixed = ff_mpadsp_apply_window_fixed;
s->dct32_float = dct.dct32;
s->dct3... | [
0,
0
] |
FFmpeg | libavcodec/h264.c | static void ff_h264_idct_add16intra_sse2(uint8_t *dst, const int *block_offset,
DCTELEM *block, int stride,
const uint8_t nnzc[6 * 8]) {
int i;
for (i = 0; i < 16; i += 2) {
if (nnzc[scan8[i + 0]] | nnzc[scan8[i + 1]])
f... | [
1,
0
] |
qemu | target-mips/helper.h | target_ulong helper_dvpe(target_ulong arg1)
{
// TODO
arg1 = 0;
// rt = arg1
return arg1;
} | [
1,
1
] |
FFmpeg | libavcodec/mips/h264qpel_msa.c | void ff_put_h264_qpel4_mc32_msa(uint8_t *dst, const uint8_t *src,
ptrdiff_t stride)
{
avc_luma_midh_qrt_4w_msa(src - (2 * stride) - 2, stride, dst, stride, 4, 1);
} | [
0,
0
] |
FFmpeg | libavcodec/mpegaudiodec.c | static void compute_antialias_fixed(MPADecodeContext *s, GranuleDef *g)
{
int32_t *ptr, *csa;
int n, i;
/* we antialias only "long" bands */
if (g->block_type == 2) {
if (!g->switch_point)
return;
/* XXX: check this for 8000Hz case */
n = 1;
} else {
n = SBLIMIT - 1;
}
pt... | [
1,
1
] |
FFmpeg | libavcodec/4xm.c | static int mjpeg_decode_init(AVCodecContext *avctx)
{
MJpegDecodeContext *s = avctx->priv_data;
MpegEncContext s2;
s->avctx = avctx;
/* ugly way to get the idct & scantable FIXME */
memset(&s2, 0, sizeof(MpegEncContext));
s2.avctx = avctx;
// s2->out_format = FMT_MJPEG;
dsputil_init(&s2.dsp,... | [
1,
1
] |
FFmpeg | libavcodec/vc9.c | static int decode_i_picture_primary_header(VC9Context *v)
{
GetBitContext *gb = &v->s.gb;
int pqindex;
/* Prolog common to all frametypes should be done in caller */
// BF = Buffer Fullness
if (v->profile <= PROFILE_MAIN && get_bits(gb, 7))
{
av_log(v->s.avctx, AV_LOG_DEBUG, "I BufferFullness no... | [
1,
1
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.