unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
147,370 | 0 | void V8TestObject::DoubleOrNullStringAttributeAttributeSetterCallback(
const v8::FunctionCallbackInfo<v8::Value>& info) {
RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT(info.GetIsolate(), "Blink_TestObject_doubleOrNullStringAttribute_Setter");
v8::Local<v8::Value> v8_value = info[0];
test_object_v8_internal::... | 1,000 |
130,590 | 0 | static void activityLoggedAttrSetter1AttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggedAttrSetter1", "TestObject", info.Holder(), info.GetIsolate());
TestObject* imp = V8TestObject::toNative(inf... | 1,001 |
164,632 | 0 | void IndexedDBDatabase::GetKeyGeneratorCurrentNumber(
IndexedDBTransaction* transaction,
int64_t object_store_id,
scoped_refptr<IndexedDBCallbacks> callbacks) {
DCHECK(transaction);
if (!ValidateObjectStoreId(object_store_id)) {
callbacks->OnError(CreateError(blink::kWebIDBDatabaseExceptionDataError... | 1,002 |
57,444 | 0 | ext4_ext_put_gap_in_cache(struct inode *inode, struct ext4_ext_path *path,
ext4_lblk_t block)
{
int depth = ext_depth(inode);
unsigned long len;
ext4_lblk_t lblock;
struct ext4_extent *ex;
ex = path[depth].p_ext;
if (ex == NULL) {
/* there is no extent yet, so gap is [0;-] */
lblock = 0;
len = EXT_MAX_... | 1,003 |
148,589 | 0 | void WebContentsImpl::UpdateWebContentsVisibility(bool visible) {
if (!did_first_set_visible_) {
if (visible) {
did_first_set_visible_ = true;
WasShown();
}
return;
}
if (visible == should_normally_be_visible_)
return;
if (visible)
WasShown();
else
WasHidden();
}
| 1,004 |
74,422 | 0 | static __inline USHORT CalculateIpPseudoHeaderChecksum(IPHeader *pIpHeader,
tTcpIpPacketParsingResult res,
USHORT headerAndPayloadLen)
{
if (res.ipStatus == ppresIPV4)
return CalculateIpv4PseudoHead... | 1,005 |
174,957 | 0 | status_t CameraClient::initialize(camera_module_t *module) {
int callingPid = getCallingPid();
status_t res;
LOG1("CameraClient::initialize E (pid %d, id %d)", callingPid, mCameraId);
res = startCameraOps();
if (res != OK) {
return res;
}
char camera_device_name[10];
snprintf(camera_device_name, si... | 1,006 |
132,676 | 0 | void BlinkTestRunner::SetEditCommand(const std::string& name,
const std::string& value) {
render_view()->SetEditCommandForNextKeyEvent(name, value);
}
| 1,007 |
15,273 | 0 | PHP_FUNCTION(stream_get_line)
{
char *str = NULL;
int str_len = 0;
long max_length;
zval *zstream;
char *buf;
size_t buf_size;
php_stream *stream;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|s", &zstream, &max_length, &str, &str_len) == FAILURE) {
RETURN_FALSE;
}
if (max_length < 0) {
php_e... | 1,008 |
149,792 | 0 | static int GetLayersUpdateTimeHistogramBucket(size_t numLayers) {
if (numLayers < 10)
return 0;
if (numLayers < 30)
return 1;
if (numLayers < 70)
return 2;
if (numLayers < 150)
return 3;
return 4;
}
| 1,009 |
172,883 | 0 | void bdt_dut_mode_configure(char *p)
{
int32_t mode = -1;
bdt_log("BT DUT MODE CONFIGURE");
if (!bt_enabled) {
bdt_log("Bluetooth must be enabled for test_mode to work.");
return;
}
mode = get_signed_int(&p, mode);
if ((mode != 0) && (mode != 1)) {
bdt_log("Please specify mode: 1 to enter,... | 1,010 |
69,967 | 0 | unsigned long getClientOutputBufferMemoryUsage(client *c) {
unsigned long list_item_size = sizeof(listNode)+sizeof(robj);
return c->reply_bytes + (list_item_size*listLength(c->reply));
}
| 1,011 |
79,429 | 0 | static int mov_write_trun_tag(AVIOContext *pb, MOVMuxContext *mov,
MOVTrack *track, int moof_size,
int first, int end)
{
int64_t pos = avio_tell(pb);
uint32_t flags = MOV_TRUN_DATA_OFFSET;
int i;
for (i = first; i < end; i++) {
if (get... | 1,012 |
4,909 | 0 | XineramaSetCursorPosition(DeviceIntPtr pDev, int x, int y, Bool generateEvent)
{
ScreenPtr pScreen;
int i;
SpritePtr pSprite = pDev->spriteInfo->sprite;
/* x,y are in Screen 0 coordinates. We need to decide what Screen
to send the message too and what the coordinates relative to
that scr... | 1,013 |
182,012 | 1 | static void sycc422_to_rgb(opj_image_t *img)
{
int *d0, *d1, *d2, *r, *g, *b;
const int *y, *cb, *cr;
unsigned int maxw, maxh, max;
int offset, upb;
unsigned int i, j;
upb = (int)img->comps[0].prec;
offset = 1<<(upb - 1); upb = (1<<upb)-1;
maxw = (unsigned int)img->comps[0].w; maxh = (unsigned int)img->comps[0].h;... | 1,014 |
99,916 | 0 | NPError NPN_NewStream(NPP id,
NPMIMEType type,
const char* target,
NPStream** stream) {
DLOG(INFO) << "NPN_NewStream is not implemented yet.";
return NPERR_GENERIC_ERROR;
}
| 1,015 |
105,586 | 0 | void Automation::GoForward(int tab_id, Error** error) {
int windex = 0, tab_index = 0;
*error = GetIndicesForTab(tab_id, &windex, &tab_index);
if (*error)
return;
std::string error_msg;
if (!SendGoForwardJSONRequest(
automation(), windex, tab_index, &error_msg)) {
*error = new Error(kUnknow... | 1,016 |
74,021 | 0 | MagickExport Image *ExtentImage(const Image *image,
const RectangleInfo *geometry,ExceptionInfo *exception)
{
Image
*extent_image;
/*
Allocate extent image.
*/
assert(image != (const Image *) NULL);
assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
(void) LogMa... | 1,017 |
26,773 | 0 | static int nl80211_set_wds_peer(struct sk_buff *skb, struct genl_info *info)
{
struct cfg80211_registered_device *rdev = info->user_ptr[0];
struct net_device *dev = info->user_ptr[1];
struct wireless_dev *wdev = dev->ieee80211_ptr;
const u8 *bssid;
if (!info->attrs[NL80211_ATTR_MAC])
return -EINVAL;
if (netif... | 1,018 |
78,028 | 0 | char* GetData(cmsIT8* it8, int nSet, int nField)
{
TABLE* t = GetTable(it8);
int nSamples = t -> nSamples;
int nPatches = t -> nPatches;
if (nSet >= nPatches || nField >= nSamples)
return NULL;
if (!t->Data) return NULL;
return t->Data [nSet * nSamples + nField];
}
| 1,019 |
102,327 | 0 | void ExtensionPrefs::SetExtensionPrefPermissionSet(
const std::string& extension_id,
const std::string& pref_key,
const ExtensionPermissionSet* new_value) {
ListValue* api_values = new ListValue();
ExtensionAPIPermissionSet apis = new_value->apis();
ExtensionPermissionsInfo* info = ExtensionPermission... | 1,020 |
4,426 | 0 | static void phar_do_404(phar_archive_data *phar, char *fname, int fname_len, char *f404, int f404_len, char *entry, int entry_len TSRMLS_DC) /* {{{ */
{
sapi_header_line ctr = {0};
phar_entry_info *info;
if (phar && f404_len) {
info = phar_get_entry_info(phar, f404, f404_len, NULL, 1 TSRMLS_CC);
if (info) {
... | 1,021 |
178,638 | 1 | static int tight_fill_palette(VncState *vs, int x, int y,
size_t count, uint32_t *bg, uint32_t *fg,
VncPalette **palette)
{
int max;
max = count / tight_conf[vs->tight.compression].idx_max_colors_divisor;
if (max < 2 &&
count >= tight_conf[vs->tight.compression].mono_min_rect_size) {
max = 2;
}
if (max >= 256) {
max =... | 1,022 |
159,866 | 0 | bool TopSitesImpl::AddPrepopulatedPages(MostVisitedURLList* urls,
size_t num_forced_urls) const {
bool added = false;
for (const auto& prepopulated_page : prepopulated_pages_) {
if (urls->size() - num_forced_urls < kNonForcedTopSitesNumber &&
IndexOf(*urls, prepop... | 1,023 |
161,493 | 0 | TargetHandler::~TargetHandler() {
}
| 1,024 |
13,711 | 0 | ZEND_API int _array_init(zval *arg, uint size ZEND_FILE_LINE_DC) /* {{{ */
{
ALLOC_HASHTABLE_REL(Z_ARRVAL_P(arg));
_zend_hash_init(Z_ARRVAL_P(arg), size, ZVAL_PTR_DTOR, 0 ZEND_FILE_LINE_RELAY_CC);
Z_TYPE_P(arg) = IS_ARRAY;
return SUCCESS;
}
/* }}} */
| 1,025 |
92,433 | 0 | static void sas_unregister_devs_sas_addr(struct domain_device *parent,
int phy_id, bool last)
{
struct expander_device *ex_dev = &parent->ex_dev;
struct ex_phy *phy = &ex_dev->ex_phy[phy_id];
struct domain_device *child, *n, *found = NULL;
if (last) {
list_for_each_entry_safe(child, n,
&ex_dev->children,... | 1,026 |
27,729 | 0 | static int sco_connect(struct sock *sk)
{
bdaddr_t *src = &bt_sk(sk)->src;
bdaddr_t *dst = &bt_sk(sk)->dst;
struct sco_conn *conn;
struct hci_conn *hcon;
struct hci_dev *hdev;
int err, type;
BT_DBG("%s -> %s", batostr(src), batostr(dst));
hdev = hci_get_route(dst, src);
if (!hdev)
return -EHOSTUNREACH;
... | 1,027 |
111,383 | 0 | bool WebPagePrivate::shouldSendResizeEvent()
{
if (!m_mainFrame->document())
return false;
static const bool unrestrictedResizeEvents = Platform::Settings::instance()->unrestrictedResizeEvents();
if (unrestrictedResizeEvents)
return true;
DocumentLoader* documentLoader = m_mainFrame->l... | 1,028 |
104,167 | 0 | bool IsOffscreenBufferMultisampled() const {
return offscreen_target_samples_ > 1;
}
| 1,029 |
74,581 | 0 | struct dentry *ovl_dentry_upper(struct dentry *dentry)
{
struct ovl_entry *oe = dentry->d_fsdata;
return ovl_upperdentry_dereference(oe);
}
| 1,030 |
61,832 | 0 | static int parse_global_var(AVFormatContext *avctx, AVStream *st,
const char *name, int size)
{
MvContext *mv = avctx->priv_data;
AVIOContext *pb = avctx->pb;
if (!strcmp(name, "__NUM_I_TRACKS")) {
mv->nb_video_tracks = var_read_int(pb, size);
} else if (!strcmp(name,... | 1,031 |
150,957 | 0 | static v8::Local<v8::Value> installPrivateScriptRunner(v8::Isolate* isolate) {
const String className = "PrivateScriptRunner";
size_t index;
for (index = 0; index < WTF_ARRAY_LENGTH(kPrivateScriptSources); index++) {
if (className == kPrivateScriptSources[index].className)
break;
}
if (index == WTF_... | 1,032 |
136,699 | 0 | void FrameSelection::Clear() {
granularity_ = TextGranularity::kCharacter;
if (granularity_strategy_)
granularity_strategy_->Clear();
SetSelectionAndEndTyping(SelectionInDOMTree());
is_handle_visible_ = false;
is_directional_ = ShouldAlwaysUseDirectionalSelection(frame_);
}
| 1,033 |
179,624 | 1 | queue_unlock(struct futex_q *q, struct futex_hash_bucket *hb)
{
spin_unlock(&hb->lock);
drop_futex_key_refs(&q->key);
}
| 1,034 |
43,431 | 0 | static int bprm_mm_init(struct linux_binprm *bprm)
{
int err;
struct mm_struct *mm = NULL;
bprm->mm = mm = mm_alloc();
err = -ENOMEM;
if (!mm)
goto err;
err = __bprm_mm_init(bprm);
if (err)
goto err;
return 0;
err:
if (mm) {
bprm->mm = NULL;
mmdrop(mm);
}
return err;
}
| 1,035 |
2,820 | 0 | gx_device_set_procs(gx_device * dev)
{
if (dev->static_procs != 0) { /* 0 if already populated */
dev->procs = *dev->static_procs;
dev->static_procs = 0;
}
}
| 1,036 |
133,775 | 0 | void SSLClientSocketOpenSSL::OnSendComplete(int result) {
if (next_handshake_state_ == STATE_HANDSHAKE) {
OnHandshakeIOComplete(result);
return;
}
int rv_read = ERR_IO_PENDING;
int rv_write = ERR_IO_PENDING;
bool network_moved;
do {
if (user_read_buf_.get())
rv_read = DoPayloadRead();
... | 1,037 |
9,631 | 0 | PHPAPI int php_session_register_module(ps_module *ptr) /* {{{ */
{
int ret = -1;
int i;
for (i = 0; i < MAX_MODULES; i++) {
if (!ps_modules[i]) {
ps_modules[i] = ptr;
ret = 0;
break;
}
}
return ret;
}
/* }}} */
| 1,038 |
128,219 | 0 | void FrameView::adjustMediaTypeForPrinting(bool printing)
{
if (printing) {
if (m_mediaTypeWhenNotPrinting.isNull())
m_mediaTypeWhenNotPrinting = mediaType();
setMediaType("print");
} else {
if (!m_mediaTypeWhenNotPrinting.isNull())
setMediaType(m_mediaTypeWhe... | 1,039 |
88,720 | 0 | static int check_confirmation(modbus_t *ctx, uint8_t *req,
uint8_t *rsp, int rsp_length)
{
int rc;
int rsp_length_computed;
const int offset = ctx->backend->header_length;
const int function = rsp[offset];
if (ctx->backend->pre_check_confirmation) {
rc = ctx->b... | 1,040 |
187,285 | 1 | FileStream::FileStream(base::File file,
const scoped_refptr<base::TaskRunner>& task_runner)
: context_(base::MakeUnique<Context>(std::move(file), task_runner)) {}
| 1,041 |
122,608 | 0 | void Extension::AddWebExtentPattern(const URLPattern& pattern) {
extent_.AddPattern(pattern);
}
| 1,042 |
44,772 | 0 | static void process_lock_setup_atfork(void)
{
pthread_atfork(process_lock, process_unlock, process_unlock);
}
| 1,043 |
31,248 | 0 | static inline struct ahash_alg *crypto_ahash_alg(struct crypto_ahash *hash)
{
return container_of(crypto_hash_alg_common(hash), struct ahash_alg,
halg);
}
| 1,044 |
123,076 | 0 | void RenderWidgetHostImpl::WasResized() {
if (resize_ack_pending_ || !process_->HasConnection() || !view_ ||
!renderer_initialized_ || should_auto_resize_) {
return;
}
gfx::Rect view_bounds = view_->GetViewBounds();
gfx::Size new_size(view_bounds.size());
bool was_fullscreen = is_fullscreen_;
is... | 1,045 |
115,154 | 0 | void GraphicsContext3D::setErrorMessageCallback(PassOwnPtr<ErrorMessageCallback>)
{
}
| 1,046 |
154,607 | 0 | error::Error GLES2DecoderPassthroughImpl::DoCoverStrokePathCHROMIUM(
GLuint path,
GLenum coverMode) {
NOTIMPLEMENTED();
return error::kNoError;
}
| 1,047 |
35,491 | 0 | static bool ieee80211_tx_prep_agg(struct ieee80211_tx_data *tx,
struct sk_buff *skb,
struct ieee80211_tx_info *info,
struct tid_ampdu_tx *tid_tx,
int tid)
{
bool queued = false;
bool reset_agg_timer = false;
struct sk_buff *purge_skb = NULL;
if (test_bit(HT_AGG_STATE_OPERATIONAL, &tid_tx->s... | 1,048 |
78,454 | 0 | gpk_restore_security_env(sc_card_t *card, int se_num)
{
return 0;
}
| 1,049 |
129,365 | 0 | GLenum GLES2DecoderImpl::GetBoundReadFrameBufferTextureType() {
Framebuffer* framebuffer =
GetFramebufferInfoForTarget(GL_READ_FRAMEBUFFER_EXT);
if (framebuffer != NULL) {
return framebuffer->GetColorAttachmentTextureType();
} else {
return GL_UNSIGNED_BYTE;
}
}
| 1,050 |
184,339 | 1 | bool WebPagePrivate::dispatchTouchPointAsMouseEventToFullScreenPlugin(PluginView* pluginView, const Platform::TouchPoint& point)
{
NPEvent npEvent;
NPMouseEvent mouse;
switch (point.m_state) {
case Platform::TouchPoint::TouchPressed:
mouse.type = MOUSE_BUTTON_DOWN;
break;
case Platform::TouchPoint::TouchReleased:
... | 1,051 |
153,001 | 0 | int PDFiumEngine::Form_Response(IPDF_JSPLATFORM* param,
FPDF_WIDESTRING question,
FPDF_WIDESTRING title,
FPDF_WIDESTRING default_response,
FPDF_WIDESTRING label,
... | 1,052 |
33,380 | 0 | kvp_work_func(struct work_struct *dummy)
{
/*
* If the timer fires, the user-mode component has not responded;
* process the pending transaction.
*/
kvp_respond_to_host("Unknown key", "Guest timed out", TIMEOUT_FIRED);
}
| 1,053 |
138,210 | 0 | void AXObject::tokenVectorFromAttribute(Vector<String>& tokens,
const QualifiedName& attribute) const {
Node* node = this->getNode();
if (!node || !node->isElementNode())
return;
String attributeValue = getAttribute(attribute).getString();
if (attributeValue.isEmpty(... | 1,054 |
44,618 | 0 | int pin_rootfs(const char *rootfs)
{
char absrootfs[MAXPATHLEN];
char absrootfspin[MAXPATHLEN];
struct stat s;
int ret, fd;
if (rootfs == NULL || strlen(rootfs) == 0)
return -2;
if (!realpath(rootfs, absrootfs))
return -2;
if (access(absrootfs, F_OK))
return -1;
if (stat(absrootfs, &s))
return -1;
... | 1,055 |
166,664 | 0 | void WebGLRenderingContextBase::hint(GLenum target, GLenum mode) {
if (isContextLost())
return;
bool is_valid = false;
switch (target) {
case GL_GENERATE_MIPMAP_HINT:
is_valid = true;
break;
case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES: // OES_standard_derivatives
if (ExtensionEnable... | 1,056 |
136,658 | 0 | void FrameLoader::DispatchUnloadEvent() {
FrameNavigationDisabler navigation_disabler(*frame_);
protect_provisional_loader_ = false;
SaveScrollState();
if (frame_->GetDocument() && !SVGImage::IsInSVGImage(frame_->GetDocument()))
frame_->GetDocument()->DispatchUnloadEvents();
}
| 1,057 |
35,804 | 0 | static void kvm_timer_init(void)
{
int cpu;
max_tsc_khz = tsc_khz;
cpu_notifier_register_begin();
if (!boot_cpu_has(X86_FEATURE_CONSTANT_TSC)) {
#ifdef CONFIG_CPU_FREQ
struct cpufreq_policy policy;
memset(&policy, 0, sizeof(policy));
cpu = get_cpu();
cpufreq_get_policy(&policy, cpu);
if (policy.cpuinfo.... | 1,058 |
98,390 | 0 | G_CONST_RETURN gchar* webkit_web_frame_get_name(WebKitWebFrame* frame)
{
g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), NULL);
WebKitWebFramePrivate* priv = frame->priv;
if (priv->name)
return priv->name;
Frame* coreFrame = core(frame);
if (!coreFrame)
return "";
String str... | 1,059 |
148,140 | 0 | void V8TestObject::VoidMethodPromiseArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
RUNTIME_CALL_TIMER_SCOPE_DISABLED_BY_DEFAULT(info.GetIsolate(), "Blink_TestObject_voidMethodPromiseArg");
test_object_v8_internal::VoidMethodPromiseArgMethod(info);
}
| 1,060 |
41,643 | 0 | static int btrfs_init_locked_inode(struct inode *inode, void *p)
{
struct btrfs_iget_args *args = p;
inode->i_ino = args->location->objectid;
memcpy(&BTRFS_I(inode)->location, args->location,
sizeof(*args->location));
BTRFS_I(inode)->root = args->root;
return 0;
}
| 1,061 |
57,298 | 0 | xdr_krb5_kvno(XDR *xdrs, krb5_kvno *objp)
{
return xdr_u_int(xdrs, objp);
}
| 1,062 |
136,664 | 0 | bool FrameLoader::IsLoadingMainFrame() const {
return frame_->IsMainFrame();
}
| 1,063 |
141,436 | 0 | void PaintLayerScrollableArea::InvalidateStickyConstraintsFor(
PaintLayer* layer,
bool needs_compositing_update) {
if (PaintLayerScrollableAreaRareData* d = RareData()) {
d->sticky_constraints_map_.erase(layer);
if (needs_compositing_update &&
layer->GetLayoutObject().StyleRef().HasStickyConst... | 1,064 |
33,913 | 0 | mainloop_child_destroy(mainloop_child_t *child)
{
if (child->timerid != 0) {
crm_trace("Removing timer %d", child->timerid);
g_source_remove(child->timerid);
child->timerid = 0;
}
free(child->desc);
g_free(child);
}
| 1,065 |
13,844 | 0 | ZEND_API void zend_update_property_double(zend_class_entry *scope, zval *object, const char *name, int name_length, double value TSRMLS_DC) /* {{{ */
{
zval *tmp;
ALLOC_ZVAL(tmp);
Z_UNSET_ISREF_P(tmp);
Z_SET_REFCOUNT_P(tmp, 0);
ZVAL_DOUBLE(tmp, value);
zend_update_property(scope, object, name, name_length, tmp T... | 1,066 |
163,096 | 0 | std::unique_ptr<BlobDataSnapshot> BlobStorageContext::CreateSnapshot(
const std::string& uuid) {
std::unique_ptr<BlobDataSnapshot> result;
BlobEntry* entry = registry_.GetEntry(uuid);
if (entry->status() != BlobStatus::DONE)
return result;
std::unique_ptr<BlobDataSnapshot> snapshot(new BlobDataSnapshot... | 1,067 |
32,939 | 0 | static void ext3_orphan_cleanup (struct super_block * sb,
struct ext3_super_block * es)
{
unsigned int s_flags = sb->s_flags;
int nr_orphans = 0, nr_truncates = 0;
#ifdef CONFIG_QUOTA
int i;
#endif
if (!es->s_last_orphan) {
jbd_debug(4, "no orphan inodes to clean up\n");
return;
}
if (bdev_read_only(sb-... | 1,068 |
21,365 | 0 | static struct vm_area_struct* hugetlb_vma(unsigned long addr, struct mm_walk *walk)
{
struct vm_area_struct *vma;
/* We don't need vma lookup at all. */
if (!walk->hugetlb_entry)
return NULL;
VM_BUG_ON(!rwsem_is_locked(&walk->mm->mmap_sem));
vma = find_vma(walk->mm, addr);
if (vma && vma->vm_start <= addr && ... | 1,069 |
11,101 | 0 | PHP_RSHUTDOWN_FUNCTION(phar) /* {{{ */
{
int i;
PHAR_G(request_ends) = 1;
if (PHAR_G(request_init))
{
phar_release_functions();
zend_hash_destroy(&(PHAR_G(phar_alias_map)));
PHAR_G(phar_alias_map.u.flags) = 0;
zend_hash_destroy(&(PHAR_G(phar_fname_map)));
PHAR_G(phar_fname_map.u.flags) = 0;
zend_hash_... | 1,070 |
178,360 | 1 | static int ohci_bus_start(OHCIState *ohci)
{
ohci->eof_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL,
ohci_frame_boundary,
ohci);
if (ohci->eof_timer == NULL) {
trace_usb_ohci_bus_eof_timer_failed(ohci->name);
ohci_die(ohci);
return 0;
}
trace_usb_oh... | 1,071 |
37,098 | 0 | static int handle_vmresume(struct kvm_vcpu *vcpu)
{
return nested_vmx_run(vcpu, false);
}
| 1,072 |
30,110 | 0 | __unregister_ftrace_function_probe(char *glob, struct ftrace_probe_ops *ops,
void *data, int flags)
{
struct ftrace_func_probe *entry;
struct hlist_node *tmp;
char str[KSYM_SYMBOL_LEN];
int type = MATCH_FULL;
int i, len = 0;
char *search;
if (glob && (strcmp(glob, "*") == 0 || !strlen(glob)))
glob = NUL... | 1,073 |
106,053 | 0 | void JSTestNamedConstructorOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
{
JSTestNamedConstructor* jsTestNamedConstructor = jsCast<JSTestNamedConstructor*>(handle.get().asCell());
DOMWrapperWorld* world = static_cast<DOMWrapperWorld*>(context);
uncacheWrapper(world, jsTestNamedConstructor... | 1,074 |
64,326 | 0 | static int test_ifmod_section(cmd_parms *cmd, const char *arg)
{
return find_module(cmd->server, arg) != NULL;
}
| 1,075 |
186,273 | 1 | static void LongOrNullAttributeAttributeSetter(
v8::Local<v8::Value> v8_value, const v8::FunctionCallbackInfo<v8::Value>& info) {
v8::Isolate* isolate = info.GetIsolate();
ALLOW_UNUSED_LOCAL(isolate);
v8::Local<v8::Object> holder = info.Holder();
ALLOW_UNUSED_LOCAL(holder);
TestObject* impl = V8TestObject::ToImpl(hol... | 1,076 |
175,639 | 0 | SoftAACEncoder2::SoftAACEncoder2(
const char *name,
const OMX_CALLBACKTYPE *callbacks,
OMX_PTR appData,
OMX_COMPONENTTYPE **component)
: SimpleSoftOMXComponent(name, callbacks, appData, component),
mAACEncoder(NULL),
mNumChannels(1),
mSampleRate(44100),
mBitRate(0),
mSBR... | 1,077 |
162,302 | 0 | gpu::CommandBuffer::State CommandBufferProxyImpl::WaitForTokenInRange(
int32_t start,
int32_t end) {
CheckLock();
base::AutoLock lock(last_state_lock_);
TRACE_EVENT2("gpu", "CommandBufferProxyImpl::WaitForToken", "start", start,
"end", end);
if (last_state_.error != gpu::error::kNoError) ... | 1,078 |
141,302 | 0 | HTMLAllCollection* Document::all() {
return EnsureCachedCollection<HTMLAllCollection>(kDocAll);
}
| 1,079 |
57,708 | 0 | int kvm_arch_vcpu_ioctl_get_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu)
{
struct fxregs_state *fxsave =
&vcpu->arch.guest_fpu.state.fxsave;
memcpy(fpu->fpr, fxsave->st_space, 128);
fpu->fcw = fxsave->cwd;
fpu->fsw = fxsave->swd;
fpu->ftwx = fxsave->twd;
fpu->last_opcode = fxsave->fop;
fpu->last_ip = fxsa... | 1,080 |
103,739 | 0 | static void AddHistogramSample(void* hist, int sample) {
base::Histogram* histogram = static_cast<base::Histogram*>(hist);
histogram->Add(sample);
}
| 1,081 |
74,406 | 0 | static NDIS_STATUS SetupDPCTarget(PARANDIS_ADAPTER *pContext)
{
ULONG i;
#if NDIS_SUPPORT_NDIS620
NDIS_STATUS status;
PROCESSOR_NUMBER procNumber;
#endif
for (i = 0; i < pContext->nPathBundles; i++)
{
#if NDIS_SUPPORT_NDIS620
status = KeGetProcessorNumberFromIndex(i, &procNumber);
i... | 1,082 |
48,601 | 0 | static void vfio_pci_request(void *device_data, unsigned int count)
{
struct vfio_pci_device *vdev = device_data;
mutex_lock(&vdev->igate);
if (vdev->req_trigger) {
if (!(count % 10))
dev_notice_ratelimited(&vdev->pdev->dev,
"Relaying device request to user (#%u)\n",
count);
eventfd_signal(vdev->req... | 1,083 |
114,189 | 0 | void BrowserGpuChannelHostFactory::Terminate() {
delete instance_;
instance_ = NULL;
}
| 1,084 |
26,654 | 0 | struct sk_buff *cfg80211_testmode_alloc_event_skb(struct wiphy *wiphy,
int approxlen, gfp_t gfp)
{
struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
return __cfg80211_testmode_alloc_skb(rdev, approxlen, 0, 0, gfp);
}
| 1,085 |
23,875 | 0 | static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
{
struct sock *sk;
struct tun_struct *tun;
struct net_device *dev;
int err;
dev = __dev_get_by_name(net, ifr->ifr_name);
if (dev) {
const struct cred *cred = current_cred();
if (ifr->ifr_flags & IFF_TUN_EXCL)
return -EBUSY;
i... | 1,086 |
110,328 | 0 | void PrintEnd() {
if (ppp_printing_ != NULL)
ppp_printing_->End(plugin_->pp_instance());
}
| 1,087 |
67,343 | 0 | static void dentry_unlock_for_move(struct dentry *dentry, struct dentry *target)
{
if (target->d_parent != dentry->d_parent)
spin_unlock(&dentry->d_parent->d_lock);
if (target->d_parent != target)
spin_unlock(&target->d_parent->d_lock);
spin_unlock(&target->d_lock);
spin_unlock(&dentry->d_lock);
}
| 1,088 |
138,133 | 0 | const AXObject::AXObjectVector& AXObject::children() {
updateChildrenIfNecessary();
return m_children;
}
| 1,089 |
142,149 | 0 | virtual void CreateEntry(const AddEntriesMessage::TestEntryInfo& entry) {
CreateEntryImpl(entry, root_path().AppendASCII(entry.target_path));
}
| 1,090 |
158,286 | 0 | TouchEmulator* RenderWidgetHostImpl::GetTouchEmulator() {
if (!delegate_ || !delegate_->GetInputEventRouter())
return nullptr;
return delegate_->GetInputEventRouter()->GetTouchEmulator();
}
| 1,091 |
61,839 | 0 | static void var_read_metadata(AVFormatContext *avctx, const char *tag, int size)
{
char *value = var_read_string(avctx->pb, size);
if (value)
av_dict_set(&avctx->metadata, tag, value, AV_DICT_DONT_STRDUP_VAL);
}
| 1,092 |
94,378 | 0 | static int read_capacity_16(struct scsi_disk *sdkp, struct scsi_device *sdp,
unsigned char *buffer)
{
unsigned char cmd[16];
struct scsi_sense_hdr sshdr;
int sense_valid = 0;
int the_result;
int retries = 3, reset_retries = READ_CAPACITY_RETRIES_ON_RESET;
unsigned int alignment;
unsigned long long lba;
un... | 1,093 |
161,402 | 0 | void ServiceWorkerHandler::ClearForceUpdate() {
if (context_)
context_->SetForceUpdateOnPageLoad(false);
}
| 1,094 |
27,412 | 0 | ip6_tnl_err(struct sk_buff *skb, __u8 ipproto, struct inet6_skb_parm *opt,
u8 *type, u8 *code, int *msg, __u32 *info, int offset)
{
struct ipv6hdr *ipv6h = (struct ipv6hdr *) skb->data;
struct ip6_tnl *t;
int rel_msg = 0;
u8 rel_type = ICMPV6_DEST_UNREACH;
u8 rel_code = ICMPV6_ADDR_UNREACH;
__u32 rel_info = ... | 1,095 |
96,965 | 0 | static struct page *new_non_cma_page(struct page *page, unsigned long private)
{
/*
* We want to make sure we allocate the new page from the same node
* as the source page.
*/
int nid = page_to_nid(page);
/*
* Trying to allocate a page for migration. Ignore allocation
* failure warnings. We don't force __G... | 1,096 |
113,331 | 0 | StatisticsCB NewStatisticsCB() {
return base::Bind(&MockStatisticsCB::OnStatistics,
base::Unretained(&statistics_cb_));
}
| 1,097 |
168,634 | 0 | void StartUpgrade() {
connection_ = db_->CreateConnection(pending_->database_callbacks,
pending_->child_process_id);
DCHECK_EQ(db_->connections_.count(connection_.get()), 1UL);
std::vector<int64_t> object_store_ids;
IndexedDBTransaction* transaction = db_->Crea... | 1,098 |
14,806 | 0 | ftp_readline(ftpbuf_t *ftp)
{
long size, rcvd;
char *data, *eol;
/* shift the extra to the front */
size = FTP_BUFSIZE;
rcvd = 0;
if (ftp->extra) {
memmove(ftp->inbuf, ftp->extra, ftp->extralen);
rcvd = ftp->extralen;
}
data = ftp->inbuf;
do {
size -= rcvd;
for (eol = data; rcvd; rcvd--, eol++) {
... | 1,099 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.