idx int64 | func string | target int64 |
|---|---|---|
82,478 | static void svm_vcpu_reset(struct kvm_vcpu *vcpu)
{
struct vcpu_svm *svm = to_svm(vcpu);
u32 dummy;
u32 eax = 1;
init_vmcb(svm);
kvm_cpuid(vcpu, &eax, &dummy, &dummy, &dummy);
kvm_register_write(vcpu, VCPU_REGS_RDX, eax);
} | 0 |
23,396 | static ssize_t virtio_net_receive ( VLANClientState * nc , const uint8_t * buf , size_t size ) {
VirtIONet * n = DO_UPCAST ( NICState , nc , nc ) -> opaque ;
struct virtio_net_hdr_mrg_rxbuf * mhdr = NULL ;
size_t guest_hdr_len , offset , i , host_hdr_len ;
if ( ! virtio_net_can_receive ( & n -> nic -> nc ) ) return... | 0 |
331,962 | static RAMBlock *unqueue_page(RAMState *rs, ram_addr_t *offset,
ram_addr_t *ram_addr_abs)
{
RAMBlock *block = NULL;
qemu_mutex_lock(&rs->src_page_req_mutex);
if (!QSIMPLEQ_EMPTY(&rs->src_page_requests)) {
struct RAMSrcPageRequest *entry =
... | 1 |
292,891 | nonce64 getNextNonce() {
SimpleMutex::scoped_lock lk(_randMutex);
return _random->nextInt64();
} | 0 |
313,358 | void ChromeContentBrowserClient::UpdateInspectorSetting(
RenderViewHost* rvh, const std::string& key, const std::string& value) {
content::BrowserContext* browser_context =
rvh->GetProcess()->GetBrowserContext();
DictionaryPrefUpdate update(
Profile::FromBrowserContext(browser_context)->GetPrefs(),
... | 0 |
179,962 | CSPHandler::CSPHandler(bool is_platform_app)
: is_platform_app_(is_platform_app) {
}
| 0 |
434,032 | static int vrend_renderer_resource_allocate_texture(struct vrend_resource *gr,
void *image_oes)
{
uint level;
GLenum internalformat, glformat, gltype;
enum virgl_formats format = gr->base.format;
struct vrend_texture *gt = (struct vrend_texture *)gr;
st... | 0 |
41,399 | void Compute(OpKernelContext* context) override {
const Tensor& data = context->input(0);
const Tensor& segment_ids = context->input(1);
const Tensor& num_segments = context->input(2);
if (!UnsortedSegmentReductionDoValidation(this, context, data, segment_ids,
... | 0 |
458,001 | struct tty_struct *alloc_tty_struct(struct tty_driver *driver, int idx)
{
struct tty_struct *tty;
tty = kzalloc(sizeof(*tty), GFP_KERNEL);
if (!tty)
return NULL;
kref_init(&tty->kref);
tty->magic = TTY_MAGIC;
if (tty_ldisc_init(tty)) {
kfree(tty);
return NULL;
}
tty->session = NULL;
tty->pgrp = NULL;
... | 0 |
407,546 | ldns_str2rdf_str(ldns_rdf **rd, const char *str)
{
uint8_t *data, *dp, ch = 0;
size_t length;
/* Worst case space requirement. We'll realloc to actual size later. */
dp = data = LDNS_XMALLOC(uint8_t, strlen(str) > 255 ? 256 : (strlen(str) + 1));
if (! data) {
return LDNS_STATUS_MEM_ERR;
}
/* Fill data (up to... | 0 |
451,951 | static void rbd_obj_handle_request(struct rbd_obj_request *obj_req, int result)
{
if (__rbd_obj_handle_request(obj_req, &result))
rbd_img_handle_request(obj_req->img_request, result);
} | 0 |
333,973 | static struct omap_mpuio_s *omap_mpuio_init(MemoryRegion *memory,
hwaddr base,
qemu_irq kbd_int, qemu_irq gpio_int, qemu_irq wakeup,
omap_clk clk)
{
struct omap_mpuio_s *s = (struct omap_mpuio_s *)
g_malloc0(sizeof(struct omap_mpuio_s));
s->ir... | 1 |
141,349 | void set_task_comm(struct task_struct *tsk, char *buf)
{
task_lock(tsk);
trace_task_rename(tsk, buf);
/*
* Threads may access current->comm without holding
* the task lock, so write the string carefully.
* Readers without a lock may see incomplete new
* names but are safe from non-terminating string reads.... | 0 |
224,728 | parse_inline_image(fz_context *ctx, pdf_csi *csi, fz_stream *stm)
{
pdf_document *doc = csi->doc;
pdf_obj *rdb = csi->rdb;
pdf_obj *obj = NULL;
fz_image *img = NULL;
int ch, found;
fz_var(obj);
fz_var(img);
fz_try(ctx)
{
obj = pdf_parse_dict(ctx, doc, stm, &doc->lexbuf.base);
/* read whitespace after ID... | 0 |
502,002 | bool samdb_set_ntds_settings_dn(struct ldb_context *ldb, struct ldb_dn *ntds_settings_dn_in)
{
TALLOC_CTX *tmp_ctx;
struct ldb_dn *ntds_settings_dn_new;
struct ldb_dn *ntds_settings_dn_old;
/* see if we have a forced copy from provision */
ntds_settings_dn_old = talloc_get_type(ldb_get_opaque(ldb,
"... | 0 |
40,876 | flatpak_dir_current_ref (FlatpakDir *self,
const char *name,
GCancellable *cancellable)
{
g_autoptr(GFile) base = NULL;
g_autoptr(GFile) dir = NULL;
g_autoptr(GFile) current_link = NULL;
g_autoptr(GFileInfo) file_info = NULL;
FlatpakDecomposed *decomposed;... | 0 |
396,439 | do_device_not_available(struct pt_regs *regs, long error_code)
{
RCU_LOCKDEP_WARN(!rcu_is_watching(), "entry code didn't wake RCU");
BUG_ON(use_eager_fpu());
#ifdef CONFIG_MATH_EMULATION
if (read_cr0() & X86_CR0_EM) {
struct math_emu_info info = { };
conditional_sti(regs);
info.regs = regs;
math_emulate(&... | 0 |
27,595 | static char * _get_user_from_associd ( mysql_conn_t * mysql_conn , char * cluster , uint32_t associd ) {
char * user = NULL ;
char * query = NULL ;
MYSQL_RES * result = NULL ;
MYSQL_ROW row ;
query = xstrdup_printf ( "select user from \"%s_%s\" where id_assoc=%u" , cluster , assoc_table , associd ) ;
debug4 ( "%d... | 0 |
434,942 | MockReadFilterCallbacks::MockReadFilterCallbacks() {
ON_CALL(*this, connection()).WillByDefault(ReturnRef(connection_));
ON_CALL(*this, upstreamHost()).WillByDefault(ReturnPointee(&host_));
ON_CALL(*this, upstreamHost(_)).WillByDefault(SaveArg<0>(&host_));
} | 0 |
401,930 | ZEND_API int ZEND_FASTCALL boolean_xor_function(zval *result, zval *op1, zval *op2) /* {{{ */
{
int op1_val, op2_val;
do {
if (Z_TYPE_P(op1) == IS_FALSE) {
op1_val = 0;
} else if (EXPECTED(Z_TYPE_P(op1) == IS_TRUE)) {
op1_val = 1;
} else {
if (Z_ISREF_P(op1)) {
op1 = Z_REFVAL_P(op1);
if (Z_TYP... | 0 |
501,984 | int samdb_reference_dn_is_our_ntdsa(struct ldb_context *ldb, struct ldb_dn *base,
const char *attribute, bool *is_ntdsa)
{
int ret;
struct ldb_dn *referenced_dn;
TALLOC_CTX *tmp_ctx = talloc_new(ldb);
if (tmp_ctx == NULL) {
return LDB_ERR_OPERATIONS_ERROR;
}
ret = samdb_reference_dn(ldb, tmp_ctx, base, ... | 0 |
468,655 | ClientRequestContext::clientAccessCheckDone(const Acl::Answer &answer)
{
acl_checklist = NULL;
err_type page_id;
Http::StatusCode status;
debugs(85, 2, "The request " << http->request->method << ' ' <<
http->uri << " is " << answer <<
"; last ACL checked: " << (AclMatchedName ? Acl... | 0 |
367,991 | impl_pause (DBusConnection * bus, DBusMessage * message, void *user_data)
{
return NULL;
} | 0 |
361,807 | u32 ethtool_op_get_tx_csum(struct net_device *dev)
{
return (dev->features & NETIF_F_ALL_CSUM) != 0;
} | 0 |
85,590 | static void digestNtoStr(const unsigned char digest[], int n, char *output)
{
int i;
for (i = 0; i<n; ++i) {
pj_val_to_hex_digit(digest[i], output);
output += 2;
}
} | 0 |
24,831 | SPL_METHOD ( SplFileInfo , func_name ) \ {
\ spl_filesystem_object * intern = ( spl_filesystem_object * ) zend_object_store_get_object ( getThis ( ) TSRMLS_CC ) ;
\ zend_error_handling error_handling ;
\ if ( zend_parse_parameters_none ( ) == FAILURE ) {
\ return ;
\ }
\ \ zend_replace_error_handling ( EH_THROW ,... | 0 |
214,675 | std::string GetIdFromImeSpec(const std::string& ime_spec) {
static const std::string kPrefix("m17n:");
return base::StartsWith(ime_spec, kPrefix, base::CompareCase::SENSITIVE)
? ime_spec.substr(kPrefix.length())
: std::string();
}
| 0 |
366,080 | _gnutls_cert_get_issuer_dn (gnutls_pcert_st * cert, gnutls_datum_t * odn)
{
ASN1_TYPE dn;
int len, result;
int start, end;
if ((result = asn1_create_element
(_gnutls_get_pkix (), "PKIX1.Certificate", &dn)) != ASN1_SUCCESS)
{
gnutls_assert ();
return _gnutls_asn2err (result);
}
res... | 0 |
360,403 | should_skip_file (NautilusDirectory *directory, GFileInfo *info)
{
static gboolean show_hidden_files_changed_callback_installed = FALSE;
static gboolean show_backup_files_changed_callback_installed = FALSE;
/* Add the callback once for the life of our process */
if (!show_hidden_files_changed_callback_installed) {... | 0 |
262,334 | static inline struct sk_buff *tcp_send_head(const struct sock *sk)
{
return sk->sk_send_head;
} | 0 |
304,879 | static struct dm_table *dm_get_live_table_fast(struct mapped_device *md) __acquires(RCU)
{
rcu_read_lock();
return rcu_dereference(md->map);
} | 0 |
348,135 | print_help (void)
{
#ifndef TESTING
/* We split the help text this way to ease translation of individual
entries. */
static const char *help[] = {
"\n",
N_("\
Mandatory arguments to long options are mandatory for short options too.\n\n"),
N_("\
Startup:\n"),
N_("\
-V, --version ... | 1 |
457,895 | static int io_poll_double_wake(struct wait_queue_entry *wait, unsigned mode,
int sync, void *key)
{
struct io_kiocb *req = wait->private;
struct io_poll_iocb *poll = io_poll_get_single(req);
__poll_t mask = key_to_poll(key);
/* for instances that support it check for an event match first: */
if (mask &&... | 0 |
74,645 | R_API int extract_type_value(const char *arg_str, char **output) {
ut8 found_one = 0, array_cnt = 0;
ut32 len = 0, consumed = 0;
char *str = NULL;
if (!arg_str || !output) {
return 0;
}
if (output && *output && *output != NULL) {
R_FREE (*output);
}
while (arg_str && *arg_str && !found_one) {
len = 1;
/... | 0 |
490,937 | void ThreadCommand::count(uint32_t count) {
count_ = count;
} | 0 |
302,237 | void kfree_skb(struct sk_buff *skb)
{
if (unlikely(!skb))
return;
if (likely(atomic_read(&skb->users) == 1))
smp_rmb();
else if (likely(!atomic_dec_and_test(&skb->users)))
return;
trace_kfree_skb(skb, __builtin_return_address(0));
__kfree_skb(skb);
} | 0 |
277,881 | void InputImeEventRouterFactory::RemoveProfile(Profile* profile) {
if (!profile || router_map_.empty())
return;
auto it = router_map_.find(profile);
if (it != router_map_.end() && it->first == profile) {
delete it->second;
router_map_.erase(it);
}
}
| 0 |
246,666 | bool RenderLayerCompositor::isMainFrame() const
{
return !m_renderView->document().ownerElement();
}
| 0 |
513,164 | void Gfx::opSave(Object args[], int numArgs) {
saveState();
} | 0 |
87,710 | send_lock_cancel(const unsigned int xid, struct cifs_tcon *tcon,
struct smb_hdr *in_buf,
struct smb_hdr *out_buf)
{
int bytes_returned;
struct cifs_ses *ses = tcon->ses;
LOCK_REQ *pSMB = (LOCK_REQ *)in_buf;
/* We just modify the current in_buf to change
the type of lock from LOCKING_ANDX_SHARED_LOCK
... | 0 |
284,768 | bool RenderWidgetHostImpl::OnMessageReceived(const IPC::Message &msg) {
if (!renderer_initialized())
return false;
if (owner_delegate_ && owner_delegate_->OnMessageReceived(msg))
return true;
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(RenderWidgetHostImpl, msg)
IPC_MESSAGE_HANDLER(FrameHostMsg_Ren... | 0 |
506,114 | BIGNUM *bn_expand2(BIGNUM *b, int words)
{
bn_check_top(b);
if (words > b->dmax)
{
BN_ULONG *a = bn_expand_internal(b, words);
if(!a) return NULL;
if(b->d) OPENSSL_free(b->d);
b->d=a;
b->dmax=words;
}
/* None of this should be necessary because of what b->top means! */
#if 0
/* NB: bn_wexpand() call... | 0 |
1,758 | static int flic_decode_frame_15_16BPP ( AVCodecContext * avctx , void * data , int * got_frame , const uint8_t * buf , int buf_size ) {
FlicDecodeContext * s = avctx -> priv_data ;
GetByteContext g2 ;
int pixel_ptr ;
unsigned char palette_idx1 ;
unsigned int frame_size ;
int num_chunks ;
unsigned int chunk_size ... | 1 |
289,124 | void vp9_restore_layer_context ( VP9_COMP * const cpi ) {
LAYER_CONTEXT * const lc = get_layer_context ( cpi ) ;
const int old_frame_since_key = cpi -> rc . frames_since_key ;
const int old_frame_to_key = cpi -> rc . frames_to_key ;
cpi -> rc = lc -> rc ;
cpi -> twopass = lc -> twopass ;
cpi -> oxcf . target_band... | 0 |
277,856 | PictureLayerTiling* PictureLayerImpl::AddTiling(float contents_scale) {
DCHECK(CanHaveTilingWithScale(contents_scale)) <<
"contents_scale: " << contents_scale;
PictureLayerTiling* tiling =
tilings_->AddTiling(contents_scale, raster_source_->GetSize());
DCHECK(raster_source_->HasRecordings());
ret... | 0 |
103,220 | static void ca8210_dev_com_clear(struct ca8210_priv *priv)
{
flush_workqueue(priv->mlme_workqueue);
destroy_workqueue(priv->mlme_workqueue);
flush_workqueue(priv->irq_workqueue);
destroy_workqueue(priv->irq_workqueue);
} | 0 |
129,318 | cherokee_validator_ldap_configure (cherokee_config_node_t *conf, cherokee_server_t *srv, cherokee_module_props_t **_props)
{
ret_t ret;
cherokee_list_t *i;
cherokee_validator_ldap_props_t *props;
UNUSED(srv);
if (*_props == NULL) {
CHEROKEE_NEW_STRUCT (n, validator_ld... | 0 |
425,701 | void *idr_replace(struct idr *idp, void *ptr, int id)
{
int n;
struct idr_layer *p, *old_p;
p = idp->top;
if (!p)
return ERR_PTR(-EINVAL);
n = (p->layer+1) * IDR_BITS;
id &= MAX_ID_MASK;
if (id >= (1 << n))
return ERR_PTR(-EINVAL);
n -= IDR_BITS;
while ((n > 0) && p) {
p = p->ary[(id >> n) & IDR_MAS... | 0 |
324,129 | void rgb8tobgr8(const uint8_t *src, uint8_t *dst, long src_size)
{
long i;
long num_pixels = src_size;
for(i=0; i<num_pixels; i++)
{
unsigned b,g,r;
register uint8_t rgb;
rgb = src[i];
r = (rgb&0x07);
g = (rgb&0x38)>>3;
b = (rgb&0xC0)>>6;
dst[i] = ((b<<1)&0x07) | ((g&0... | 1 |
491,108 | xfs_ioc_getlabel(
struct xfs_mount *mp,
char __user *user_label)
{
struct xfs_sb *sbp = &mp->m_sb;
char label[XFSLABEL_MAX + 1];
/* Paranoia */
BUILD_BUG_ON(sizeof(sbp->sb_fname) > FSLABEL_MAX);
/* 1 larger than sb_fname, so this ensures a trailing NUL char */
memset(label, 0, sizeof(label));
spin_lock(... | 0 |
64,125 | small_smb2_init(__le16 smb2_command, struct cifs_tcon *tcon,
void **request_buf)
{
int rc;
unsigned int total_len;
struct smb2_pdu *pdu;
rc = smb2_reconnect(smb2_command, tcon);
if (rc)
return rc;
/* BB eventually switch this to SMB2 specific small buf size */
*request_buf = cifs_small_buf_get();
if (*req... | 0 |
417,822 | Init_pack(void)
{
rb_define_method(rb_cArray, "pack", pack_pack, -1);
rb_define_method(rb_cString, "unpack", pack_unpack, 1);
rb_define_method(rb_cString, "unpack1", pack_unpack1, 1);
id_associated = rb_make_internal_id();
} | 0 |
283,185 | unsigned char *ssl_add_serverhello_tlsext(SSL *s, unsigned char *buf,
unsigned char *limit)
{
int extdatalen = 0;
unsigned char *orig = buf;
unsigned char *ret = buf;
# ifndef OPENSSL_NO_NEXTPROTONEG
int next_proto_neg_seen;
# endif
/*
* don't add exte... | 0 |
519,545 | virtual ulonglong get_max_int_value() const
{
return unsigned_flag ? 0xFFULL : 0x7FULL;
} | 0 |
252,478 | int DownloadManagerImpl::NonMaliciousInProgressCount() const {
int count = 0;
for (const auto& it : downloads_) {
if (it.second->GetState() == download::DownloadItem::IN_PROGRESS &&
it.second->GetDangerType() !=
download::DOWNLOAD_DANGER_TYPE_DANGEROUS_URL &&
it.second->GetDangerType... | 0 |
201,642 | status_t BnHDCP::onTransact(
uint32_t code, const Parcel &data, Parcel *reply, uint32_t flags) {
switch (code) {
case HDCP_SET_OBSERVER:
{
CHECK_INTERFACE(IHDCP, data, reply);
sp<IHDCPObserver> observer =
interface_cast<IHDCPObserver>(data.readStrongBinder());
r... | 0 |
31,068 | static int add_one_ref ( const char * path , const struct object_id * oid , int flag , void * cb_data ) {
struct rev_info * revs = ( struct rev_info * ) cb_data ;
struct object * object ;
if ( ( flag & REF_ISSYMREF ) && ( flag & REF_ISBROKEN ) ) {
warning ( "symbolic ref is dangling: %s" , path ) ;
return 0 ;
}
... | 0 |
224,226 | void Tab::SetClosing(bool closing) {
closing_ = closing;
ActiveStateChanged();
if (closing) {
focus_ring_.reset();
}
}
| 0 |
284,644 | ProcUnmapSubwindows(ClientPtr client)
{
WindowPtr pWin;
REQUEST(xResourceReq);
int rc;
REQUEST_SIZE_MATCH(xResourceReq);
rc = dixLookupWindow(&pWin, stuff->id, client, DixListAccess);
if (rc != Success)
return rc;
UnmapSubwindows(pWin);
return Success;
}
| 0 |
505,484 | int tls1_mac(SSL *ssl, unsigned char *md, int send)
{
SSL3_RECORD *rec;
unsigned char *mac_sec,*seq;
const EVP_MD *hash;
size_t md_size;
int i;
HMAC_CTX hmac;
unsigned char header[13];
if (send)
{
rec= &(ssl->s3->wrec);
mac_sec= &(ssl->s3->write_mac_secret[0]);
seq= &(ssl->s3->write_sequence[0]);
ha... | 0 |
275,384 | HarfBuzzShaper::HarfBuzzRun::~HarfBuzzRun()
{
}
| 0 |
58,906 | wiki_handle_http_request(HttpRequest *req)
{
HttpResponse *res = http_response_new(req);
char *page = http_request_get_path_info(req);
char *command = http_request_get_query_string(req);
char *wikitext = "";
util_dehttpize(page); /* remove any encoding on the requested
... | 0 |
16,636 | static void hscroll ( AVCodecContext * avctx ) {
AnsiContext * s = avctx -> priv_data ;
int i ;
if ( s -> y < avctx -> height - s -> font_height ) {
s -> y += s -> font_height ;
return ;
}
i = 0 ;
for ( ;
i < avctx -> height - s -> font_height ;
i ++ ) memcpy ( s -> frame -> data [ 0 ] + i * s -> frame -> lin... | 0 |
471,827 | int zsetAdd(robj *zobj, double score, sds ele, int *flags, double *newscore) {
/* Turn options into simple to check vars. */
int incr = (*flags & ZADD_INCR) != 0;
int nx = (*flags & ZADD_NX) != 0;
int xx = (*flags & ZADD_XX) != 0;
*flags = 0; /* We'll return our response flags. */
double curscor... | 0 |
156,888 | __napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb)
{
struct sk_buff *p;
if (netpoll_rx_on(skb))
return GRO_NORMAL;
for (p = napi->gro_list; p; p = p->next) {
NAPI_GRO_CB(p)->same_flow =
(p->dev == skb->dev) &&
!compare_ether_header(skb_mac_header(p),
skb_gro_mac_header(skb));
... | 0 |
499,900 | unsigned int rijndaelSetupEncrypt(u32 *rk, const u8 *key, size_t keybits)
{
int i = 0;
u32 temp;
rk[0] = GETU32(key );
rk[1] = GETU32(key + 4);
rk[2] = GETU32(key + 8);
rk[3] = GETU32(key + 12);
if (keybits == 128)
{
for (;;)
{
temp = rk[3];
rk[4] = rk[0] ^
(Te4[(temp... | 0 |
121,740 | mrb_io_close_on_exec_p(mrb_state *mrb, mrb_value self)
{
#if defined(F_GETFD) && defined(F_SETFD) && defined(FD_CLOEXEC)
struct mrb_io *fptr;
int ret;
fptr = io_get_open_fptr(mrb, self);
if (fptr->fd2 >= 0) {
if ((ret = fcntl(fptr->fd2, F_GETFD)) == -1) mrb_sys_fail(mrb, "F_GETFD failed");
if (!(ret &... | 0 |
400,965 | static LEX_CSTRING event_to_str(unsigned int event_class,
unsigned long event_subclass)
{
int count;
for (count= 0; event_subclass; count++, event_subclass >>= 1);
return event_names[event_class][count - 1];
} | 0 |
180,648 | void ResourceMessageFilter::OnClipboardWriteObjectsSync(
const Clipboard::ObjectMap& objects,
base::SharedMemoryHandle bitmap_handle) {
DCHECK(base::SharedMemory::IsHandleValid(bitmap_handle))
<< "Bad bitmap handle";
Clipboard::ObjectMap* long_living_objects = new Clipboard::ObjectMap(objects);
Cli... | 0 |
112,141 | static int SQLITE_NOINLINE handleMovedCursor(VdbeCursor *p){
int isDifferentRow, rc;
assert( p->eCurType==CURTYPE_BTREE );
assert( p->uc.pCursor!=0 );
assert( sqlite3BtreeCursorHasMoved(p->uc.pCursor) );
rc = sqlite3BtreeCursorRestore(p->uc.pCursor, &isDifferentRow);
p->cacheStatus = CACHE_STALE;
if( isDi... | 0 |
430,371 | ippGetStatusCode(ipp_t *ipp) /* I - IPP response or event message */
{
/*
* Range check input...
*/
if (!ipp)
return (IPP_STATUS_ERROR_INTERNAL);
/*
* Return the value...
*/
return (ipp->request.status.status_code);
} | 0 |
2,817 | Pl_Count::write(unsigned char* buf, size_t len)
{
if (len)
{
this->m->count += QIntC::to_offset(len);
getNext()->write(buf, len);
this->m->last_char = buf[len - 1];
}
} | 1 |
4,736 | static inline int xsave_state_booting(struct xsave_struct *fx, u64 mask)
{
u32 lmask = mask;
u32 hmask = mask >> 32;
int err = 0;
WARN_ON(system_state != SYSTEM_BOOTING);
if (boot_cpu_has(X86_FEATURE_XSAVES))
asm volatile("1:"XSAVES"\n\t"
"2:\n\t"
: : "D" (fx), "m" (*fx), "a" (lmask), "d" (hmask)
: ... | 1 |
483,309 | struct cgroup *cgroup_get_from_path(const char *path)
{
struct kernfs_node *kn;
struct cgroup *cgrp = ERR_PTR(-ENOENT);
kn = kernfs_walk_and_get(cgrp_dfl_root.cgrp.kn, path);
if (!kn)
goto out;
if (kernfs_type(kn) != KERNFS_DIR) {
cgrp = ERR_PTR(-ENOTDIR);
goto out_kernfs;
}
rcu_read_lock();
cgrp = rc... | 0 |
322,437 | void pci_bridge_exitfn(PCIDevice *pci_dev)
{
PCIBridge *s = DO_UPCAST(PCIBridge, dev, pci_dev);
assert(QLIST_EMPTY(&s->sec_bus.child));
QLIST_REMOVE(&s->sec_bus, sibling);
pci_bridge_region_cleanup(s);
memory_region_destroy(&s->address_space_mem);
memory_region_destroy(&s->address_space_i... | 1 |
340,895 | static int mov_text_decode_frame(AVCodecContext *avctx,
void *data, int *got_sub_ptr, AVPacket *avpkt)
{
AVSubtitle *sub = data;
int ret, ts_start, ts_end;
AVBPrint buf;
char *ptr = avpkt->data;
char *end;
//char *ptr_temp;
int text_length, tsmb_type, sty... | 1 |
157,254 | PG::RecoveryCtx OSD::create_context()
{
ObjectStore::Transaction *t = new ObjectStore::Transaction;
C_Contexts *on_applied = new C_Contexts(cct);
C_Contexts *on_safe = new C_Contexts(cct);
map<int, map<spg_t,pg_query_t> > *query_map =
new map<int, map<spg_t, pg_query_t> >;
map<int,vector<pair<pg_notify_t,... | 0 |
273,849 | static void icall_aulevel_handler(struct icall *icall, struct list *levell, void *arg)
{
struct wcall *wcall = arg;
struct calling_instance *inst = wcall ? wcall->inst : NULL;
char *json_str = NULL;
char *info_str = NULL;
uint64_t now;
int err = 0;
if (!WCALL_VALID(wcall)) {
warning("wcall(%p): icall_aulevel_... | 0 |
188,261 | int bdrv_commit_all(void)
{
BlockDriverState *bs;
QTAILQ_FOREACH(bs, &bdrv_states, device_list) {
if (bs->drv && bs->backing_hd) {
int ret = bdrv_commit(bs);
if (ret < 0) {
return ret;
}
}
}
return 0;
}
| 0 |
96,470 | static inline void ModulateHCLp(const double percent_hue,
const double percent_chroma,const double percent_luma,double *red,
double *green,double *blue)
{
double
hue,
luma,
chroma;
/*
Increase or decrease color luma, chroma, or hue.
*/
ConvertRGBToHCLp(*red,*green,*blue,&hue,&chroma,&luma);... | 0 |
38,603 | static int megasas_get_ld_vf_affiliation_12(struct megasas_instance *instance,
int initial)
{
struct megasas_cmd *cmd;
struct megasas_dcmd_frame *dcmd;
struct MR_LD_VF_AFFILIATION *new_affiliation = NULL;
struct MR_LD_VF_MAP *newmap = NULL, *savedmap = NULL;
dma_addr_t new_affiliation_h;
int i, j, retval... | 0 |
250,208 | static void removeEventListenerMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjectPythonV8Internal::removeEventListenerMethod(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
| 0 |
250,378 | static int _make_words(char *l,long n,ogg_uint32_t *r,long quantvals,
codebook *b, oggpack_buffer *opb,int maptype){
long i,j,count=0;
long top=0;
ogg_uint32_t marker[MARKER_SIZE];
if (n<1)
return 1;
if(n<2){
r[0]=0x80000000;
}else{
memset(marker,0,sizeof(marker));
for(i... | 0 |
397,459 | static void ringbuf_chr_close(struct CharDriverState *chr)
{
RingBufCharDriver *d = chr->opaque;
g_free(d->cbuf);
g_free(d);
chr->opaque = NULL;
} | 0 |
81,034 | static int verify_newpolicy_info(struct xfrm_userpolicy_info *p)
{
switch (p->share) {
case XFRM_SHARE_ANY:
case XFRM_SHARE_SESSION:
case XFRM_SHARE_USER:
case XFRM_SHARE_UNIQUE:
break;
default:
return -EINVAL;
}
switch (p->action) {
case XFRM_POLICY_ALLOW:
case XFRM_POLICY_BLOCK:
break;
default:
... | 0 |
287,216 | static void parse_class(RBinFile *binfile, RBinDexObj *bin, RBinDexClass *c,
int class_index, int *methods, int *sym_count) {
struct r_bin_t *rbin = binfile->rbin;
char *class_name;
int z;
const ut8 *p, *p_end;
if (!c) {
return;
}
class_name = dex_class_name (bin, c);
class_name = r_str_replace (class_... | 1 |
496,552 | static Plane_3 convert(Plane_3 p){return p;} | 0 |
181,644 | FileTransfer::addFileToExeptionList( const char* filename )
{
if ( !ExceptionFiles ) {
ExceptionFiles = new StringList;
ASSERT ( NULL != ExceptionFiles );
} else if ( ExceptionFiles->file_contains ( filename ) ) {
return true;
}
ExceptionFiles->append ( filename );
return true;
}
| 0 |
358,597 | static int load_guest_segment_descriptor(struct kvm_vcpu *vcpu, u16 selector,
struct desc_struct *seg_desc)
{
gpa_t gpa;
struct descriptor_table dtable;
u16 index = selector >> 3;
get_segment_descriptor_dtable(vcpu, selector, &dtable);
if (dtable.limit < index * 8 + 7) {
kvm_queue_exception_e(vcpu, GP_VE... | 0 |
393,438 | referenceDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
{
callbacks++;
if (quiet)
return;
fprintf(SAXdebug, "SAX.reference(%s)\n", name);
} | 0 |
519,586 | void Field_varstring::sql_rpl_type(String *res) const
{
CHARSET_INFO *cs=charset();
if (Field_varstring::has_charset())
{
size_t length= cs->cset->snprintf(cs, (char*) res->ptr(),
res->alloced_length(),
"varchar(%u octets) character s... | 0 |
398,284 | void js_pushlstring(js_State *J, const char *v, int n)
{
CHECKSTACK(1);
if (n <= soffsetof(js_Value, type)) {
char *s = STACK[TOP].u.shrstr;
while (n--) *s++ = *v++;
*s = 0;
STACK[TOP].type = JS_TSHRSTR;
} else {
STACK[TOP].type = JS_TMEMSTR;
STACK[TOP].u.memstr = jsV_newmemstring(J, v, n);
}
++TOP;
} | 0 |
107,368 | ovsinst_bitmap_from_openflow(ovs_be32 ofpit_bitmap, enum ofp_version version)
{
uint32_t ovsinst_bitmap = 0;
const struct ovsinst_map *x;
for (x = get_ovsinst_map(version); x->ofpit >= 0; x++) {
if (ofpit_bitmap & htonl(1u << x->ofpit)) {
ovsinst_bitmap |= 1u << x->ovsinst;
}
... | 0 |
453,468 | group_sched_out(struct perf_event *group_event,
struct perf_cpu_context *cpuctx,
struct perf_event_context *ctx)
{
struct perf_event *event;
if (group_event->state != PERF_EVENT_STATE_ACTIVE)
return;
perf_pmu_disable(ctx->pmu);
event_sched_out(group_event, cpuctx, ctx);
/*
* Schedule out siblings (if a... | 0 |
469,600 | mat_copy(const char* src, const char* dst)
{
size_t len;
char buf[BUFSIZ] = {'\0'};
FILE* in = NULL;
FILE* out = NULL;
#if defined(_WIN32) && defined(_MSC_VER)
{
wchar_t* wname = utf82u(src);
if ( NULL != wname ) {
in = _wfopen(wname, L"rb");
free(wname);
... | 0 |
333,718 | static void pc_xen_hvm_init(QEMUMachineInitArgs *args)
{
if (xen_hvm_init() != 0) {
hw_error("xen hardware virtual machine initialisation failed");
}
pc_init_pci(args);
}
| 0 |
428,526 | replace_rw_async_data_free (ReplaceRWAsyncData *data)
{
g_free (data->etag);
g_free (data);
} | 0 |
239,129 | virtual void drawLayers()
{
CCLayerTreeHostImpl::drawLayers();
m_testHooks->drawLayersOnCCThread(this);
}
| 0 |
212,725 | static bool VerifyNumber(const uint8* buffer,
int buffer_size,
int* offset,
int max_digits) {
RCHECK(*offset < buffer_size);
while (isspace(buffer[*offset])) {
++(*offset);
RCHECK(*offset < buffer_size);
}
int numSeen = 0;
wh... | 0 |
431,946 | static inline unsigned int xfrm_expire_msgsize(void)
{
return NLMSG_ALIGN(sizeof(struct xfrm_user_expire))
+ nla_total_size(sizeof(struct xfrm_mark));
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.