Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
FFmpeg | libavcodec/roqvideoenc.c | static void create_cel_evals(RoqContext *enc, RoqTempdata *tempData)
{
int n = 0, x, y, i;
tempData->cel_evals =
av_malloc(enc->width * enc->height / 64 * sizeof(CelEvaluation));
/* Map to the ROQ quadtree order */
for (y = 0; y < enc->height; y += 16)
for (x = 0; x < enc->width; x += 16)
... | [
1,
0
] |
FFmpeg | avconv.c | int ff_tempfile(const char *prefix, char **filename) {
int fd = -1;
#if !HAVE_MKSTEMP
*filename = tempnam(".", prefix);
#else
size_t len = strlen(prefix) + 12; /* room for "/tmp/" and "XXXXXX\0" */
*filename = av_malloc(len);
#endif
/* -----common section-----*/
if (*filename == NULL) {
av_log... | [
0,
0
] |
qemu | linux-user/elfload.c | int loader_exec(const char *filename, char **argv, char **envp,
struct target_pt_regs *regs, struct image_info *infop,
struct linux_binprm *bprm)
{
int retval;
int i;
bprm->p = TARGET_PAGE_SIZE * MAX_ARG_PAGES - sizeof(unsigned int);
memset(bprm->page, 0, sizeof(bprm->page... | [
1,
0
] |
qemu | target-alpha/helper.h | uint64_t helper_mulqv(CPUAlphaState *env, uint64_t op1, uint64_t op2)
{
uint64_t tl, th;
muls64(&tl, &th, op1, op2);
/* If th != 0 && th != -1, then we had an overflow */
if (unlikely((th + 1) > 1)) {
arith_excp(env, GETPC(), EXC_M_IOV, 0);
}
return tl;
} | [
1,
0
] |
qemu | target-ppc/mmu_helper.c | target_ulong helper_load_slb_vsid(CPUPPCState *env, target_ulong rb)
{
target_ulong rt;
if (ppc_load_slb_vsid(env, rb, &rt) < 0) {
helper_raise_exception_err(env, POWERPC_EXCP_PROGRAM,
POWERPC_EXCP_INVAL);
}
return rt;
} | [
1,
0
] |
FFmpeg | libavcodec/mpegaudiodec.c | static void compute_antialias_integer(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;
... | [
1,
1
] |
FFmpeg | ffserver.c | static void rtsp_cmd_describe(HTTPContext *c, const char *url)
{
FFStream *stream;
char path1[1024];
const char *path;
uint8_t *content;
int content_length, len;
struct sockaddr_in my_addr;
/* find which url is asked */
url_split(NULL, 0, NULL, 0, NULL, 0, NULL, path1, sizeof(path1), url);
p... | [
1,
1
] |
qemu | async.c | static void aio_rfifolock_cb(void *opaque)
{
/* Kick owner thread in case they are blocked in aio_poll() */
aio_notify(opaque);
} | [
1,
0
] |
qemu | Makefile | static int posix_aio_init(void)
{
sigset_t mask;
PosixAioState *s;
if (posix_aio_state)
return 0;
s = qemu_malloc(sizeof(PosixAioState));
if (s == NULL)
return -ENOMEM;
/* Make sure to block AIO signal */
sigemptyset(&mask);
sigaddset(&mask, SIGUSR2);
sigprocmask(SIG_BLOCK, &mask, ... | [
1,
1
] |
qemu | qga/channel-posix.c | static void build_fs_mount_list_from_mtab(FsMountList *mounts, Error **errp)
{
struct mntent *ment;
FsMount *mount;
char const *mtab = "/proc/self/mounts";
FILE *fp;
unsigned int devmajor, devminor;
fp = setmntent(mtab, "r");
if (!fp) {
error_setg(errp, "failed to open mtab file: '%s'", mtab)... | [
1,
0
] |
qemu | include/qapi/visitor-impl.h | void visit_type_enum(Visitor *v, const char *name, int *obj,
const char *const strings[], Error **errp)
{
assert(obj && strings);
if (v->type == VISITOR_INPUT) {
input_type_enum(v, name, obj, strings, errp);
} else if (v->type == VISITOR_OUTPUT) {
output_type_enum(v, name, obj,... | [
1,
0
] |
qemu | block/qcow2-cache.c | int qcow2_pre_write_overlap_check(BlockDriverState *bs, int chk, int64_t offset,
int64_t size)
{
int ret = qcow2_check_metadata_overlap(bs, chk, offset, size);
if (ret < 0) {
return ret;
} else if (ret > 0) {
int metadata_ol_bitnr = ffs(ret) - 1;
char *message... | [
1,
0
] |
qemu | block/nbd.c | char *socket_address_to_string(struct SocketAddressLegacy *addr, Error **errp)
{
char *buf;
InetSocketAddress *inet;
switch (addr->type) {
case SOCKET_ADDRESS_LEGACY_KIND_INET:
inet = addr->u.inet.data;
if (strchr(inet->host, ':') == NULL) {
buf = g_strdup_printf("%s:%s", inet->host, inet-... | [
1,
0
] |
qemu | backends/rng-egd.c | static void rng_egd_finalize(Object *obj)
{
RngEgd *s = RNG_EGD(obj);
if (s->chr) {
qemu_chr_add_handlers(s->chr, NULL, NULL, NULL, NULL);
qemu_chr_fe_release(s->chr);
}
g_free(s->chr_name);
rng_egd_free_requests(s);
} | [
0,
0
] |
qemu | hw/qdev-core.h | void qbus_create_inplace(BusState *bus, const char *typename,
DeviceState *parent, const char *name)
{
object_initialize(bus, typename);
qbus_realize(bus, parent, name);
} | [
0,
0
] |
FFmpeg | libswscale/utils.c | SwsVector *sws_cloneVec(SwsVector *a)
{
int i;
SwsVector *vec = sws_allocVec(a->length);
if (!vec)
return NULL;
for (i = 0; i < a->length; i++)
vec->coeff[i] = a->coeff[i];
return vec;
} | [
0,
0
] |
qemu | io/channel-websock.c | static ssize_t qio_channel_websock_readv(QIOChannel *ioc,
const struct iovec *iov,
size_t niov,
int **fds,
size_t *nfds,
... | [
1,
0
] |
qemu | coroutine-ucontext.c | static CoroutineThreadState *coroutine_get_thread_state(void)
{
CoroutineThreadState *s = pthread_getspecific(thread_state_key);
if (!s) {
s = g_malloc0(sizeof(*s));
s->current = &s->leader.base;
QLIST_INIT(&s->pool);
pthread_setspecific(thread_state_key, s);
}
return s;
} | [
0,
0
] |
qemu | pc-bios/s390-ccw/bootmap.c | int zipl_load(void)
{
struct mbr *mbr = (void *)sec;
uint8_t *ns, *ns_end;
int program_table_entries = 0;
int pte_len = sizeof(struct scsi_blockptr);
struct scsi_blockptr *prog_table_entry;
const char *error = "";
/* Grab the MBR */
virtio_read(0, (void *)mbr);
dputs("checking magic\n");
... | [
1,
0
] |
qemu | hw/sd/sdhci.c | static void sdhci_data_transfer(void *opaque)
{
SDHCIState *s = (SDHCIState *)opaque;
if (s->trnmod & SDHC_TRNS_DMA) {
switch (SDHC_DMA_TYPE(s->hostctl)) {
case SDHC_CTRL_SDMA:
if ((s->trnmod & SDHC_TRNS_MULTI) &&
(!(s->trnmod & SDHC_TRNS_BLK_CNT_EN) || s->blkcnt == 0)) {
bre... | [
1,
0
] |
qemu | hmp.c | static void nested_struct_compare(UserDefTwo *udnp1, UserDefTwo *udnp2)
{
g_assert(udnp1);
g_assert(udnp2);
g_assert_cmpstr(udnp1->string0, ==, udnp2->string0);
g_assert_cmpstr(udnp1->dict1->string1, ==, udnp2->dict1->string1);
g_assert_cmpint(udnp1->dict1->dict2->userdef->base->integer, ==,
... | [
1,
0
] |
FFmpeg | doc/APIchanges | int av_vsrc_buffer_add_frame(AVFilterContext *buffer_src, const AVFrame *frame)
{
int ret;
AVFilterBufferRef *picref =
avfilter_get_video_buffer_ref_from_frame(frame, AV_PERM_WRITE);
if (!picref)
return AVERROR(ENOMEM);
ret = av_vsrc_buffer_add_video_buffer_ref(buffer_src, picref);
picref->b... | [
1,
0
] |
qemu | Makefile.objs | int xbzrle_decode_buffer(uint8_t *src, int slen, uint8_t *dst, int dlen)
{
int i = 0, d = 0;
int ret;
uint32_t count = 0;
while (i < slen) {
/* zrun */
if ((slen - i) < 2) {
return -1;
}
ret = uleb128_decode_small(src + i, &count);
if (ret < 0 || (i && !count)) {
retur... | [
1,
0
] |
qemu | Makefile.objs | static void put_uint8(QEMUFile *f, void *pv, size_t size)
{
uint8_t *v = pv;
qemu_put_8s(f, v);
} | [
1,
0
] |
qemu | util/throttle.c | static void throttle_fix_bucket(LeakyBucket *bkt)
{
double min;
/* zero bucket level */
bkt->level = bkt->burst_level = 0;
/* The following is done to cope with the Linux CFQ block scheduler
* which regroup reads and writes by block of 100ms in the guest.
* When they are two process one making read... | [
1,
0
] |
FFmpeg | libavcodec/arm/rv34dsp_init_neon.c | static void rv40_v_strong_loop_filter(uint8_t *src, const int stride,
const int alpha, const int lims,
const int dmode, const int chroma)
{
rv40_strong_loop_filter(src, 1, stride, alpha, lims, dmode, chroma);
} | [
1,
0
] |
FFmpeg | libavcodec/vorbisenc.c | static void move_audio(vorbis_enc_context *venc, float *audio, int *samples,
int sf_size)
{
AVFrame *cur = NULL;
int frame_size = 1 << (venc->log2_blocksize[1] - 1);
int subframes = frame_size / sf_size;
for (int sf = 0; sf < subframes; sf++) {
cur = ff_bufqueue_get(&venc->bufqu... | [
1,
0
] |
qemu | linux-user/signal.c | static void host_signal_handler(int host_signum, siginfo_t *info,
void *puc)
{
int sig;
target_siginfo_t tinfo;
/* the CPU emulator uses some host signals to detect exceptions,
we we forward to it some signals */
if (host_signum == SIGSEGV || host_signum == SIGBUS) {
... | [
1,
0
] |
FFmpeg | libavcodec/y41pdec.c | static int y41p_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame, AVPacket *avpkt)
{
AVFrame *pic = data;
uint8_t *src = avpkt->data;
uint8_t *y, *u, *v;
int i, j, ret;
if (avpkt->size < 3LL * avctx->height * avctx->width / 2) {
av_log(avctx, AV_LOG_ERROR... | [
1,
0
] |
qemu | linux-user/main.c | static void gen_tlbivax_booke206(DisasContext *ctx)
{
#if defined(CONFIG_USER_ONLY)
gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);
#else
TCGv t0;
if (unlikely(ctx->pr)) {
gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);
return;
}
t0 = tcg_temp_new();
gen_addr_reg_index(ctx, t0);
gen_h... | [
1,
0
] |
qemu | target-sparc/op_helper.c | void helper_ldf_asi(target_ulong addr, int asi, int size, int rd) {
unsigned int i;
target_ulong val;
helper_check_align(addr, 3);
addr = asi_address_mask(env, asi, addr);
switch (asi) {
case 0xf0: // Block load primary
case 0xf1: // Block load secondary
case 0xf8: // Block load primary LE
case 0xf9: ... | [
1,
1
] |
qemu | hw/scsi/scsi-disk.c | static void scsi_write_same_complete(void *opaque, int ret)
{
WriteSameCBData *data = opaque;
SCSIDiskReq *r = data->r;
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
assert(r->req.aiocb != NULL);
r->req.aiocb = NULL;
aio_context_acquire(blk_get_aio_context(s->qdev.conf.blk));
if (... | [
1,
0
] |
qemu | monitor.c | void monitor_flush(Monitor *mon)
{
int rc;
size_t len;
const char *buf;
if (mon->skip_flush) {
return;
}
buf = qstring_get_str(mon->outbuf);
len = qstring_get_length(mon->outbuf);
if (len && !mon->mux_out) {
rc = qemu_chr_fe_write(mon->chr, (const uint8_t *)buf, len);
if (rc == le... | [
1,
0
] |
qemu | hw/s390x/virtio-ccw.c | static void virtio_pci_device_plugged(DeviceState *d)
{
VirtIOPCIProxy *proxy = VIRTIO_PCI(d);
VirtioBusState *bus = &proxy->bus;
uint8_t *config;
uint32_t size;
VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
config = proxy->pci_dev.config;
if (proxy->class_code) {
pci_config_set_cl... | [
1,
0
] |
qemu | cpu-exec.c | void HELPER(set_cp_reg)(CPUARMState *env, void *rip, uint32_t value)
{
const ARMCPRegInfo *ri = rip;
ri->writefn(env, ri, value);
} | [
1,
0
] |
FFmpeg | doc/filters.texi | static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
{
mp_image_t *dmpi;
// hope we'll get DR buffer:
dmpi =
ff_vf_get_image(vf->next, IMGFMT_YV12,
MP_IMGTYPE_TEMP,
MP_IMGFLAG_ACCEPT_STRIDE |
((vf->priv->scaleh ... | [
1,
0
] |
qemu | cpus.c | static void runstate_init(void)
{
const RunStateTransition *p;
memset(&runstate_valid_transitions, 0, sizeof(runstate_valid_transitions));
for (p = &runstate_transitions_def[0]; p->from != RUN_STATE_MAX; p++) {
runstate_valid_transitions[p->from][p->to] = true;
}
} | [
1,
0
] |
FFmpeg | libavformat/os_support.c | int inet_aton(const char *str, struct in_addr *add)
{
const char *pch = str;
unsigned int add1 = 0, add2 = 0, add3 = 0, add4 = 0;
add1 = atoi(pch);
pch = strpbrk(pch, ".");
if (pch == 0 || ++pch == 0)
goto done;
add2 = atoi(pch);
pch = strpbrk(pch, ".");
if (pch == 0 || ++pch == 0)
goto... | [
1,
0
] |
qemu | tests/test-visitor-serialization.c | static void string_deserialize(void **native_out, void *datap,
VisitorFunc visit, Error **errp)
{
StringSerializeData *d = datap;
d->siv = string_input_visitor_new(string_output_get_string(d->sov));
visit(string_input_get_visitor(d->siv), native_out, errp);
} | [
1,
0
] |
qemu | block-migration.c | static void init_blk_migration_it(void *opaque, BlockDriverState *bs)
{
BlkMigDevState *bmds;
int64_t sectors;
if (!bdrv_is_read_only(bs)) {
sectors = bdrv_nb_sectors(bs);
if (sectors <= 0) {
return;
}
bmds = g_malloc0(sizeof(BlkMigDevState));
bmds->bs = bs;
bmds->bulk_comp... | [
1,
0
] |
qemu | exec.c | static int memory_access_size(MemoryRegion *mr, unsigned l, hwaddr addr)
{
unsigned access_size_min = mr->ops->impl.min_access_size;
unsigned access_size_max = mr->ops->impl.max_access_size;
/* Regions are assumed to support 1-4 byte accesses unless
otherwise specified. */
if (access_size_min == 0) ... | [
1,
0
] |
qemu | target-ppc/cpu.h | PPC_OP(mulli)
{
T0 = (Ts0 * SPARAM(1));
RETURN();
} | [
1,
0
] |
FFmpeg | libavcodec/yop.c | static void yop_next_macroblock(YopDecContext *s)
{
// If we are advancing to the next row of macroblocks
if (s->row_pos == s->frame.linesize[0] - 2) {
s->dstptr += s->frame.linesize[0];
s->row_pos = 0;
} else {
s->row_pos += 2;
}
s->dstptr += 2;
} | [
1,
0
] |
FFmpeg | libswscale/Makefile | static inline void
RENAME(bgr24ToUV_half)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1,
const uint8_t *src2, long width, uint32_t *unused)
{
int i;
for (i = 0; i < width; i++) {
int b = src1[6 * i + 0] + src1[6 * i + 3];
int g = src1[6 * i + 1] + src1[6 * i + 4];
int r ... | [
1,
0
] |
qemu | hw/acpi/nvdimm.c | static void nvdimm_dsm_reserved_root(AcpiNVDIMMState *state, NvdimmDsmIn *in,
hwaddr dsm_mem_addr)
{
switch (in->function) {
case 0x0:
nvdimm_dsm_function0(0x1 | 1 << 1 /* Read FIT */, dsm_mem_addr);
return;
case 0x1 /* Read FIT */:
nvdimm_dsm_func_read_fit... | [
1,
0
] |
qemu | hw/xen/xen_backend.c | void xen_be_unbind_evtchn(struct XenDevice *xendev)
{
if (xendev->local_port == -1) {
return;
}
qemu_set_fd_handler(xc_evtchn_fd(xendev->evtchndev), NULL, NULL, NULL);
xc_evtchn_unbind(xendev->evtchndev, xendev->local_port);
xen_be_printf(xendev, 2, "unbind evtchn port %d\n", xendev->local_port);
... | [
0,
0
] |
qemu | block-qcow2.c | static void check_refcounts(BlockDriverState *bs)
{
BDRVQcowState *s = bs->opaque;
int64_t size;
int nb_clusters, refcount1, refcount2, i;
QCowSnapshot *sn;
uint16_t *refcount_table;
size = bdrv_getlength(s->hd);
nb_clusters = size_to_clusters(s, size);
refcount_table = qemu_mallocz(nb_clusters... | [
1,
0
] |
qemu | HACKING | void *iommu_dma_memory_map(DMAContext *dma, dma_addr_t addr, dma_addr_t *len,
DMADirection dir)
{
int err;
target_phys_addr_t paddr, plen;
void *buf;
if (dma->map) {
return dma->map(dma, addr, len, dir);
}
plen = *len;
err = dma->translate(dma, addr, &paddr, &plen, ... | [
0,
0
] |
qemu | target/hppa/translate.c | static ExitStatus trans_fop_wed_0e(DisasContext *ctx, uint32_t insn,
const DisasInsn *di)
{
unsigned rt = assemble_rt64(insn);
unsigned ra = extract32(insn, 21, 5);
return do_fop_wed(ctx, rt, ra, di->f_wed);
} | [
1,
0
] |
FFmpeg | Changelog | void filter_level_for_mb(VP8Context *s, VP8Macroblock *mb, VP8FilterStrength *f)
{
int interior_limit, filter_level;
if (s->segmentation.enabled) {
filter_level = s->segmentation.filter_level[mb->segment];
if (!s->segmentation.absolute_vals)
filter_level += s->filter.level;
} else
filter... | [
1,
0
] |
qemu | host-utils.c | void muls64(int64_t *phigh, int64_t *plow, int64_t a, int64_t b)
{
#if defined(__x86_64__)
__asm__("imul %0\n\t"
: "=d"(*phigh), "=a"(*plow)
: "a"(a), "0"(b)
);
#else
int64_t ph;
uint64_t pm1, pm2, pl;
pl = (uint64_t)((uint32_t)a) * (uint64_t)((uint32_t)b);
pm1 = (a >> 32) * (... | [
1,
0
] |
FFmpeg | libavformat/nutdec.c | static int decode_syncpoint(NUTContext *nut) {
AVFormatContext *s = nut->avf;
ByteIOContext *bc = &s->pb;
int64_t end;
uint64_t tmp;
int i;
AVRational time_base;
nut->last_syncpoint_pos = url_ftell(bc) - 8;
end = get_packetheader(nut, bc, 1);
end += url_ftell(bc) - 4;
tmp = get_v(bc);
g... | [
1,
1
] |
qemu | hw/eccmemctl.c | static void ecc_mem_writel(void *opaque, target_phys_addr_t addr, uint32_t val)
{
ECCState *s = opaque;
switch (addr & ECC_ADDR_MASK) {
case ECC_MER:
s->regs[0] = (s->regs[0] & (ECC_MER_VER | ECC_MER_IMPL)) |
(val & ~(ECC_MER_VER | ECC_MER_IMPL));
DPRINTF("Write memory enable %08x\... | [
1,
0
] |
FFmpeg | libswscale/cs_test.c | void palette8torgb15(const uint8_t *src, uint8_t *dst, long num_pixels,
const uint8_t *palette)
{
long i;
for (i = 0; i < num_pixels; i++)
((uint16_t *)dst)[i] = ((uint16_t *)palette)[src[i]];
} | [
1,
0
] |
qemu | trace/simple.c | void st_set_trace_file_enabled(bool enable)
{
if (enable == !!trace_fp) {
return; /* no change */
}
/* Halt trace writeout */
flush_trace_file(true);
trace_writeout_enabled = false;
flush_trace_file(true);
if (enable) {
static const TraceRecord header = {
.event = HEADER_EVENT_ID... | [
1,
0
] |
qemu | block/block-backend.c | static int blk_root_inactivate(BdrvChild *child)
{
BlockBackend *blk = child->opaque;
if (blk->disable_perm) {
return 0;
}
/* Only inactivate BlockBackends for guest devices (which are inactive at
* this point because the VM is stopped) and unattached monitor-owned
* BlockBackends. If there is ... | [
1,
0
] |
qemu | hw/milkymist-softusb.c | static inline void softusb_read_dmem(MilkymistSoftUsbState *s,
uint32_t offset, uint8_t *buf,
uint32_t len)
{
if (offset + len >= s->dmem_size) {
error_report("milkymist_softusb: read dmem out of bounds "
"at offset 0x... | [
1,
0
] |
FFmpeg | libavcodec/escape124.c | static int can_safely_read(GetBitContext *gb, int bits) {
return get_bits_left(gb) >= bits;
} | [
1,
0
] |
qemu | monitor.c | static void handle_hmp_command(Monitor *mon, const char *cmdline)
{
QDict *qdict;
const mon_cmd_t *cmd;
qdict = qdict_new();
cmd = monitor_parse_command(mon, cmdline, 0, mon->cmd_table, qdict);
if (cmd) {
cmd->mhandler.cmd(mon, qdict);
}
QDECREF(qdict);
} | [
0,
0
] |
qemu | hw/unin_pci.c | static int unin_agp_pci_host_init(PCIDevice *d)
{
pci_config_set_vendor_id(d->config, PCI_VENDOR_ID_APPLE);
pci_config_set_device_id(d->config, PCI_DEVICE_ID_APPLE_UNI_N_AGP);
d->config[0x08] = 0x00; // revision
pci_config_set_class(d->config, PCI_CLASS_BRIDGE_HOST);
d->config[0x0C] = 0x08; // cache_lin... | [
1,
0
] |
qemu | include/migration/colo.h | static void colo_process_checkpoint(MigrationState *s)
{
QIOChannelBuffer *bioc;
QEMUFile *fb = NULL;
int64_t current_time, checkpoint_time = qemu_clock_get_ms(QEMU_CLOCK_HOST);
Error *local_err = NULL;
int ret;
failover_init_state();
s->rp_state.from_dst_file = qemu_file_get_return_path(s->to_dst... | [
0,
0
] |
qemu | kvm-all.c | static int kvm_physical_sync_dirty_bitmap(MemoryRegionSection *section)
{
KVMState *s = kvm_state;
unsigned long size, allocated_size = 0;
KVMDirtyLog d;
KVMSlot *mem;
int ret = 0;
hwaddr start_addr = section->offset_within_address_space;
hwaddr end_addr = start_addr + int128_get64(section->size);... | [
1,
1
] |
qemu | hw/ppc/spapr_pci.c | static void rtas_ibm_slot_error_detail(PowerPCCPU *cpu,
sPAPREnvironment *spapr,
uint32_t token, uint32_t nargs,
target_ulong args, uint32_t nret,
target_ulong ... | [
1,
0
] |
qemu | target-unicore32/Makefile.objs | float64 HELPER(ucf64_muld)(float64 a, float64 b, CPUUniCore32State *env)
{
return float64_mul(a, b, &env->ucf64.fp_status);
} | [
0,
0
] |
qemu | qemu-char.c | static int tcp_chr_add_client(CharDriverState *chr, int fd)
{
TCPCharDriver *s = chr->opaque;
if (s->fd != -1)
return -1;
qemu_set_nonblock(fd);
if (s->do_nodelay)
socket_set_nodelay(fd);
s->fd = fd;
s->chan = io_channel_from_socket(fd);
g_source_remove(s->listen_tag);
s->listen_tag =... | [
1,
0
] |
qemu | tcg/s390/tcg-target.h | static int tcg_match_add2i(TCGType type, tcg_target_long val)
{
if (facilities & FACILITY_EXT_IMM) {
if (type == TCG_TYPE_I32) {
return 1;
} else if (val >= -0xffffffffll && val <= 0xffffffffll) {
return 1;
}
}
return 0;
} | [
1,
0
] |
qemu | block.c | int coroutine_fn bdrv_is_allocated(BlockDriverState *bs, int64_t sector_num,
int nb_sectors, int *pnum)
{
return bdrv_get_block_status(bs, sector_num, nb_sectors, pnum);
} | [
0,
0
] |
qemu | MAINTAINERS | static void notdirty_mem_writew(void *opaque, target_phys_addr_t ram_addr,
uint32_t val)
{
int dirty_flags;
dirty_flags = phys_ram_dirty[ram_addr >> TARGET_PAGE_BITS];
if (!(dirty_flags & CODE_DIRTY_FLAG)) {
#if !defined(CONFIG_USER_ONLY)
tb_invalidate_phys_page_fast(ram... | [
1,
0
] |
qemu | block/raw-posix.c | static void aio_signal_handler(int signum)
{
if (posix_aio_state) {
char byte = 0;
write(posix_aio_state->wfd, &byte, sizeof(byte));
}
qemu_service_io();
} | [
1,
0
] |
qemu | hw/nseries.c | inline qemu_irq omap_inth_get_pin(struct omap_intr_handler_s *s, int n)
{
return s->pins[n];
} | [
0,
0
] |
qemu | target-mips/cpu.h | static void gen_cop1_ldst(DisasContext *ctx, uint32_t op, int rt,
int rs, int16_t imm)
{
if (ctx->CP0_Config1 & (1 << CP0C1_FP)) {
check_cp1_enabled(ctx);
gen_flt_ldst(ctx, op, rt, rs, imm);
} else {
generate_exception_err(ctx, EXCP_CpU, 1);
}
} | [
0,
0
] |
qemu | audio/audio.c | static uint32_t vbe_ioport_read_index(void *opaque, uint32_t addr)
{
VGACommonState *s = opaque;
uint32_t val;
val = s->vbe_index;
return val;
} | [
0,
0
] |
qemu | cpu-exec.c | static void gen_op_mull_T0_T1(void)
{
TCGv tmp1 = tcg_temp_new(TCG_TYPE_I64);
TCGv tmp2 = tcg_temp_new(TCG_TYPE_I64);
tcg_gen_extu_i32_i64(tmp1, cpu_T[0]);
tcg_gen_extu_i32_i64(tmp2, cpu_T[1]);
tcg_gen_mul_i64(tmp1, tmp1, tmp2);
tcg_gen_trunc_i64_i32(cpu_T[0], tmp1);
tcg_gen_shri_i64(tmp1, tmp1, 3... | [
0,
0
] |
qemu | net/netmap.c | static void netmap_update_fd_handler(NetmapState *s)
{
qemu_set_fd_handler2(s->me.fd,
s->read_poll ? netmap_can_send : NULL,
s->read_poll ? netmap_send : NULL,
s->write_poll ? netmap_writable : NULL,
s);
} | [
0,
0
] |
qemu | hw/ppc/spapr_drc.c | static sPAPRDREntitySense logical_entity_sense(sPAPRDRConnector *drc)
{
if (drc->dev
&& (drc->allocation_state != SPAPR_DR_ALLOCATION_STATE_UNUSABLE)) {
return SPAPR_DR_ENTITY_SENSE_PRESENT;
} else {
return SPAPR_DR_ENTITY_SENSE_UNUSABLE;
}
} | [
1,
0
] |
qemu | check-qdict.c | START_TEST(qdict_get_not_exists_test)
{
fail_unless(qdict_get(tests_dict, "foo") == NULL);
} | [
0,
0
] |
qemu | hmp.c | static int64_t do_strtosz(const char *nptr, char **end,
const char default_suffix, int64_t unit)
{
int64_t retval;
char *endptr;
unsigned char c;
int mul_required = 0;
double val, mul, integral, fraction;
errno = 0;
val = strtod(nptr, &endptr);
if (isnan(val) || endpt... | [
1,
0
] |
qemu | hw/openpic.c | static void openpic_save(QEMUFile *f, void *opaque)
{
OpenPICState *opp = (OpenPICState *)opaque;
unsigned int i;
qemu_put_be32s(f, &opp->glbc);
qemu_put_be32s(f, &opp->veni);
qemu_put_be32s(f, &opp->pint);
qemu_put_be32s(f, &opp->spve);
qemu_put_be32s(f, &opp->tifr);
for (i = 0; i < opp->max_i... | [
0,
0
] |
qemu | MAINTAINERS | static int64_t raw_getlength(BlockDriverState *bs)
{
int64_t len;
BDRVRawState *s = bs->opaque;
/* Update size. It should not change unless the file was externally
* modified. */
len = bdrv_getlength(bs->file->bs);
if (len < 0) {
return len;
}
if (len < s->offset) {
s->size = 0;
} ... | [
1,
0
] |
qemu | tests/test-qmp-input-strict.c | static void test_validate_fail_union_flat(TestInputVisitorData *data,
const void *unused)
{
UserDefFlatUnion *tmp = NULL;
Error *err = NULL;
Visitor *v;
v = validate_test_init(data,
"{ 'string': 'c', 'integer': 41, 'boolean': true }");
... | [
1,
0
] |
qemu | hw/input/Makefile.objs | static int adb_mouse_poll(ADBDevice *d, uint8_t *obuf)
{
MouseState *s = ADB_MOUSE(d);
int dx, dy;
if (s->last_buttons_state == s->buttons_state &&
s->dx == 0 && s->dy == 0)
return 0;
dx = s->dx;
if (dx < -63)
dx = -63;
else if (dx > 63)
dx = 63;
dy = s->dy;
if (dy < -63)
... | [
1,
0
] |
qemu | target-ppc/cpu.h | hwaddr ppc_cpu_get_phys_page_debug(CPUState *cs, vaddr addr)
{
PowerPCCPU *cpu = POWERPC_CPU(cs);
CPUPPCState *env = &cpu->env;
mmu_ctx_t ctx;
switch (env->mmu_model) {
#if defined(TARGET_PPC64)
case POWERPC_MMU_64B:
case POWERPC_MMU_2_03:
case POWERPC_MMU_2_06:
case POWERPC_MMU_2_07:
ret... | [
1,
0
] |
qemu | hw/virtio/virtio-pci.c | static void virtio_pci_reset(DeviceState *qdev)
{
VirtIOPCIProxy *proxy = VIRTIO_PCI(qdev);
VirtioBusState *bus = VIRTIO_BUS(&proxy->bus);
int i;
virtio_pci_stop_ioeventfd(proxy);
virtio_bus_reset(bus);
msix_unuse_all_vectors(&proxy->pci_dev);
for (i = 0; i < VIRTIO_QUEUE_MAX; i++) {
proxy->v... | [
1,
0
] |
qemu | target-m68k/translate.c | DISAS_INSN(fsave)
{
/* TODO: Implement fsave. */
qemu_assert(0, "FSAVE not implemented");
} | [
1,
1
] |
qemu | hw/intc/xics.c | target_ulong spapr_rtas_call(PowerPCCPU *cpu, sPAPREnvironment *spapr,
uint32_t token, uint32_t nargs, target_ulong args,
uint32_t nret, target_ulong rets)
{
if ((token >= TOKEN_BASE)
&& ((token - TOKEN_BASE) < TOKEN_MAX)) {
struct rtas_call *c... | [
1,
1
] |
qemu | hw/ide/ahci.c | static int32_t ahci_dma_prepare_buf(IDEDMA *dma, int is_write)
{
AHCIDevice *ad = DO_UPCAST(AHCIDevice, dma, dma);
IDEState *s = &ad->port.ifs[0];
if (ahci_populate_sglist(ad, &s->sg, s->io_buffer_offset) == -1) {
DPRINTF(ad->port_no, "ahci_dma_prepare_buf failed.\n");
return -1;
}
s->io_buffer... | [
1,
0
] |
qemu | cpus.c | void qemu_tcg_configure(QemuOpts *opts, Error **errp)
{
const char *t = qemu_opt_get(opts, "thread");
if (t) {
if (strcmp(t, "multi") == 0) {
if (TCG_OVERSIZED_GUEST) {
error_setg(errp, "No MTTCG when guest word size > hosts");
} else if (use_icount) {
error_setg(errp, "No MT... | [
1,
0
] |
FFmpeg | libavformat/aviobuf.c | static int bytes_left(ByteIOContext *bc)
{
return bc->buf_end - bc->buf_ptr;
} | [
0,
0
] |
qemu | target-i386/op.c | static inline void gen_scas(DisasContext *s, int ot)
{
gen_op_mov_TN_reg(OT_LONG, 0, R_EAX);
gen_string_movl_A0_EDI(s);
gen_op_ld_T1_A0(ot + s->mem_index);
gen_op_cmpl_T0_T1_cc();
gen_op_movl_T0_Dshift[ot]();
#ifdef TARGET_X86_64
if (s->aflag == 2) {
gen_op_addq_EDI_T0();
} else
#endif
... | [
0,
0
] |
qemu | cpu-exec.c | static inline void gen_neon_narrow_sats(int size, TCGv dest, TCGv src)
{
switch (size) {
case 0:
gen_helper_neon_narrow_sat_s8(dest, cpu_env, src);
break;
case 1:
gen_helper_neon_narrow_sat_s16(dest, cpu_env, src);
break;
case 2:
gen_helper_neon_narrow_sat_s32(dest, cpu_env, src);
b... | [
0,
0
] |
FFmpeg | libavcodec/hevc_refs.c | RefPicList *ff_hevc_get_ref_list(HEVCContext *s, HEVCFrame *ref, int x0, int y0)
{
if (x0 < 0 || y0 < 0) {
return s->ref->refPicList;
} else {
int x_cb = x0 >> s->sps->log2_ctb_size;
int y_cb = y0 >> s->sps->log2_ctb_size;
int pic_width_cb = (s->sps->width + (1 << s->sps->log2_ctb_size) - 1) ... | [
1,
0
] |
FFmpeg | avprobe.c | static void show_packets(AVFormatContext *fmt_ctx)
{
AVPacket pkt;
av_init_packet(&pkt);
while (!av_read_frame(fmt_ctx, &pkt))
show_packet(fmt_ctx, &pkt);
} | [
0,
0
] |
qemu | target-xtensa/cpu.h | void cpu_dump_state(CPUXtensaState *env, FILE *f, fprintf_function cpu_fprintf,
int flags)
{
int i, j;
cpu_fprintf(f, "PC=%08x\n\n", env->pc);
for (i = j = 0; i < 256; ++i) {
if (sregnames[i]) {
cpu_fprintf(f, "%s=%08x%c", sregnames[i], env->sregs[i],
(j++ %... | [
1,
0
] |
FFmpeg | libavcodec/dvdsub_parser.c | static int dvdsub_parse(AVCodecParserContext *s,
AVCodecContext *avctx,
const uint8_t **poutbuf, int *poutbuf_size,
const uint8_t *buf, int buf_size)
{
DVDSubParseContext *pc = s->priv_data;
if (pc->packet_index == 0) {
if (buf_size ... | [
1,
0
] |
FFmpeg | libavfilter/avfilter.c | int avfilter_default_config_output_link(AVFilterLink *link)
{
if (link->src->input_count && link->src->inputs[0]) {
if (link->type == AVMEDIA_TYPE_VIDEO) {
link->w = link->src->inputs[0]->w;
link->h = link->src->inputs[0]->h;
link->time_base = link->src->inputs[0]->time_base;
} else i... | [
1,
1
] |
FFmpeg | libavformat/mov.c | static int mov_read_extradata(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
AVStream *st;
uint64_t size;
uint8_t *buf;
int err;
if (c->fc->nb_streams < 1) // will happen with jp2 files
return 0;
st = c->fc->streams[c->fc->nb_streams - 1];
size = (uint64_t)st->codec->extradata_size + atom.si... | [
1,
1
] |
FFmpeg | libavutil/mem.c | static inline int ff_fast_malloc(void *ptr, unsigned int *size, size_t min_size,
int zero_realloc)
{
void *val;
if (min_size < *size)
return 0;
min_size = FFMAX(17 * min_size / 16 + 32, min_size);
av_freep(ptr);
val = zero_realloc ? av_mallocz(min_size) : av_malloc(... | [
1,
0
] |
qemu | bsd-user/main.c | static void test_parse_path(void)
{
g_test_trap_subprocess("/logging/parse_path/subprocess", 0, 0);
g_test_trap_assert_passed();
g_test_trap_assert_stdout("");
g_test_trap_assert_stderr("");
} | [
1,
0
] |
qemu | include/qemu/range.h | static void string_output_append(StringOutputVisitor *sov, int64_t a)
{
Range *r = g_malloc0(sizeof(*r));
r->begin = a;
r->end = a + 1;
sov->ranges = g_list_insert_sorted_merged(sov->ranges, r, range_compare);
} | [
1,
0
] |
FFmpeg | libavcodec/vaapi_encode.c | av_cold int ff_vaapi_encode_close(AVCodecContext *avctx)
{
VAAPIEncodeContext *ctx = avctx->priv_data;
VAAPIEncodePicture *pic, *next;
for (pic = ctx->pic_start; pic; pic = next) {
next = pic->next;
vaapi_encode_free(avctx, pic);
}
if (ctx->va_context != VA_INVALID_ID) {
vaDestroyContext(c... | [
0,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.