username
stringlengths
1
36
repo
stringlengths
1
82
path
stringlengths
4
161
function
stringlengths
0
328
code
stringlengths
15
240k
func_defs
stringlengths
0
313k
llvm
stringclasses
1 value
hash
stringlengths
64
64
memory
int64
15
240k
masterfeizz
EDuke3D
source/sounds.c
S_ClearSoundLocks
void S_ClearSoundLocks(void) { int32_t i; int32_t const msp = g_maxSoundPos; for (i = 0; i < 11; ++i) if (rts_lumplockbyte[i] >= 200) rts_lumplockbyte[i] = 199; for (i = 0; i < msp; ++i) if (g_soundlocks[i] >= 200) g_soundlocks[i] = 199; }
void S_SoundStartup(void); void S_SoundShutdown(void); void S_MusicStartup(void); void S_MusicShutdown(void); void S_PauseMusic(int32_t onf); void S_MusicVolume(int32_t volume); void S_RestartMusic(void); void S_MenuSound(void); int32_t S_GetMusicPosition(void); void S_SetMusicPosition(int32_t position); void S_StopMusic(void); void S_Cleanup(void); static inline int32_t S_GetPitch(int32_t num); static int32_t S_TakeSlot(int32_t num); static int32_t S_GetSlot(int32_t num); static inline int32_t S_GetAngle(int32_t camang, const vec3_t *cam, const vec3_t *pos); int32_t S_PlaySound3D(int32_t num, int32_t i, const vec3_t *pos); int32_t S_PlaySound(int32_t num); int32_t A_PlaySound(uint32_t num, int32_t i); void S_StopEnvSound(int32_t num, int32_t i); void S_ChangeSoundPitch(int32_t num, int32_t i, int32_t pitchoffset); void S_Update(void); void S_Callback(uint32_t num); int32_t A_CheckSoundPlaying(int32_t i, int32_t num); int32_t A_CheckAnySoundPlaying(int32_t i); int32_t S_CheckSoundPlaying(int32_t i, int32_t num);
d6601443d40b7477927c2c82a91ce2150ff7ce8232ca76c611639ab5476a7940
299
Mic92
systemd
src/test/test-execute.c
test_exec_capabilityambientset
static void test_exec_capabilityambientset(Manager *m) { int r; r = prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_CLEAR_ALL, 0, 0, 0); if (r < 0 && IN_SET(errno, EINVAL, EOPNOTSUPP, ENOSYS)) { log_error("Skipping %s, the kernel does not support ambient capabilities", __func__); return; } if (getpwnam("nobody")) { test(m, "exec-capabilityambientset.service", 0, CLD_EXITED); test(m, "exec-capabilityambientset-merge.service", 0, CLD_EXITED); } else if (getpwnam("nfsnobody")) { test(m, "exec-capabilityambientset-nfsnobody.service", 0, CLD_EXITED); test(m, "exec-capabilityambientset-merge-nfsnobody.service", 0, CLD_EXITED); } else log_error_errno(errno, "Skipping %s, could not find nobody/nfsnobody user: %m", __func__); }
static void check(Manager *m, Unit *unit, int status_expected, int code_expected); static bool is_inaccessible_available(void); static void test(Manager *m, const char *unit_name, int status_expected, int code_expected); static void test_exec_bindpaths(Manager *m); static void test_exec_cpuaffinity(Manager *m); static void test_exec_workingdirectory(Manager *m); static void test_exec_personality(Manager *m); static void test_exec_ignoresigpipe(Manager *m); static void test_exec_privatetmp(Manager *m); static void test_exec_privatedevices(Manager *m); static void test_exec_protectkernelmodules(Manager *m); static void test_exec_readonlypaths(Manager *m); static void test_exec_readwritepaths(Manager *m); static void test_exec_inaccessiblepaths(Manager *m); static void test_exec_systemcallfilter(Manager *m); static void test_exec_systemcallerrornumber(Manager *m); static void test_exec_restrictnamespaces(Manager *m); static void test_exec_systemcallfilter_system(Manager *m); static void test_exec_user(Manager *m); static void test_exec_group(Manager *m); static void test_exec_supplementarygroups(Manager *m); static void test_exec_dynamicuser(Manager *m); static void test_exec_environment(Manager *m); static void test_exec_environmentfile(Manager *m); static void test_exec_passenvironment(Manager *m); static void test_exec_umask(Manager *m); static void test_exec_runtimedirectory(Manager *m); static void test_exec_capabilityboundingset(Manager *m); static void test_exec_privatenetwork(Manager *m); static void test_exec_oomscoreadjust(Manager *m); static void test_exec_ioschedulingclass(Manager *m); static void test_exec_unsetenvironment(Manager *m); static void test_exec_specifier(Manager *m); static void test_exec_standardinput(Manager *m); static int run_tests(UnitFileScope scope, const test_function_t *tests); int main(int argc, char *argv[]);
63cfbdc734403c1caa699a558a94d1dccda1626449decb9dd5e08145b895280a
898
navicore
oescript_c
modules/scripting/swig/guile/OeScript_guile_wrap.c
SCM _wrap_OesDispatcher_start
static SCM _wrap_OesDispatcher_start (SCM s_0) { #define FUNC_NAME "OesDispatcher-start" OesDispatcher *arg1 = (OesDispatcher *) 0 ; SCM gswig_result; SWIGUNUSED int gswig_list_p = 0; { arg1 = (OesDispatcher *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_OesDispatcher, 1, 0); } { oe_scalar err; clear_exception(); OesDispatcher_start(arg1); if ((err = check_exception())) { OE_ERR( NULL, "... swig exception: %s\n", err) assert(false); return err; } } gswig_result = SCM_UNSPECIFIED; return gswig_result; #undef FUNC_NAME }
SWIGINTERNINLINE int SWIG_AddCast(int r); SWIGINTERNINLINE int SWIG_CheckState(int r); long SWIG_Guile_PointerAddress(SCM object); SWIGINTERN OesDataObject *new_OesDataObject(); SWIGINTERN void delete_OesDataObject(OesDataObject *self); SWIGINTERN int OesDataObject_get_nattrs(OesDataObject *self); SWIGINTERN void OesDataObject_add_attr(OesDataObject *self,char *entry); SWIGINTERN void OesDataObject_set_nbytes(OesDataObject *self,size_t nbytes); SWIGINTERN int OesDataObject_get_nbytes(OesDataObject *self); SWIGINTERN OesIterator *OesDataObject_iter(OesDataObject *self); SWIGINTERN void OesDataObject_set_bytes(OesDataObject *self,char *bytes); SWIGINTERN char *OesDataObject_get_bytes(OesDataObject *self); SWIGINTERN OesSigHandler *new_OesSigHandler(char const *filename,char const *appname,char const *loglvl); SWIGINTERN void delete_OesSigHandler(OesSigHandler *self); SWIGINTERN void OesSigHandler_add__SWIG_0(OesSigHandler *self,OesDispatcher *manageme); SWIGINTERN void OesSigHandler_add__SWIG_1(OesSigHandler *self,OesThreadDispatcher *manageme); SWIGINTERN void OesSigHandler_add__SWIG_2(OesSigHandler *self,OesStore *manageme); SWIGINTERN void OesSigHandler_add__SWIG_3(OesSigHandler *self,OesServer *manageme); SWIGINTERN void OesSigHandler_add__SWIG_4(OesSigHandler *self,OesKernel *manageme); SWIGINTERN void OesSigHandler_add__SWIG_5(OesSigHandler *self,OesNet *manageme); SWIGINTERN OesDispatcher *new_OesDispatcher(size_t nthreads,char const *name); SWIGINTERN void delete_OesDispatcher(OesDispatcher *self); SWIGINTERN void OesDispatcher_start(OesDispatcher *self); SWIGINTERN OesThreadDispatcher *new_OesThreadDispatcher(size_t nthreads); SWIGINTERN void delete_OesThreadDispatcher(OesThreadDispatcher *self); SWIGINTERN void OesThreadDispatcher_start(OesThreadDispatcher *self); SWIGINTERN OesStore *new_OesStore(int persist_level,char const *homedir,bool threaded); SWIGINTERN void delete_OesStore(OesStore *self); SWIGINTERN OesNet *new_OesNet(OesDispatcher *d,bool use_ssl,char *cert,char *pkey); SWIGINTERN void delete_OesNet(OesNet *self); SWIGINTERN void OesNet_setName(OesNet *self,char *name); SWIGINTERN char *OesNet_getName(OesNet *self); SWIGINTERN void delete_OesLoginModule(OesLoginModule *self); SWIGINTERN OesBuiltInLoginModule *new_OesBuiltInLoginModule(); SWIGINTERN void delete_OesBuiltInLoginModule(OesBuiltInLoginModule *self); SWIGINTERN int OesBuiltInLoginModule_addAccount(OesBuiltInLoginModule *self,char *groupname,char *username,char *pwd); SWIGINTERN int OesBuiltInLoginModule_addPrivilege(OesBuiltInLoginModule *self,char *extentname,char *groupname,char *mtemplate); SWIGINTERN OesLoginModule *OesBuiltInLoginModule_getModule(OesBuiltInLoginModule *self); SWIGINTERN OesPamLoginModule *new_OesPamLoginModule(char *pamdomain,char *defgroup); SWIGINTERN void delete_OesPamLoginModule(OesPamLoginModule *self); SWIGINTERN int OesPamLoginModule_addPrivilege(OesPamLoginModule *self,char *extentname,char *groupname,char *mtemplate); SWIGINTERN OesLoginModule *OesPamLoginModule_getModule(OesPamLoginModule *self); SWIGINTERN OesServer *new_OesServer(OesDispatcher *dispatcher,char *spec,OesNet *net,OesStore *store); SWIGINTERN void delete_OesServer(OesServer *self); SWIGINTERN void OesServer_addLoginModule(OesServer *self,OesLoginModule *m); SWIGINTERN void OesServer_addKernel(OesServer *self,char *extentname,OesKernel *kernel); SWIGINTERN OesDataObjectList *new_OesDataObjectList(); SWIGINTERN void delete_OesDataObjectList(OesDataObjectList *self); SWIGINTERN int OesDataObjectList_length(OesDataObjectList *self); SWIGINTERN OesListIterator *OesDataObjectList_iter(OesDataObjectList *self); SWIGINTERN OesDataObject *OesDataObjectList_newDataObject(OesDataObjectList *self); SWIGINTERN void delete_OesIterator(OesIterator *self); SWIGINTERN char *OesIterator_nextItem(OesIterator *self); SWIGINTERN bool OesIterator_hasMore(OesIterator *self); SWIGINTERN void delete_OesListIterator(OesListIterator *self); SWIGINTERN OesDataObject *OesListIterator_nextItem(OesListIterator *self); SWIGINTERN bool OesListIterator_hasMore(OesListIterator *self); SWIGINTERN void delete_OesLease(OesLease *self); SWIGINTERN long OesLease_lid(OesLease *self); SWIGINTERN void OesLease_cancel(OesLease *self); SWIGINTERN void delete_OesTxn(OesTxn *self); SWIGINTERN long OesTxn_tid(OesTxn *self); OES_TXN_STATUS OesTxn_status(OesTxn *self); SWIGINTERN void OesTxn_commit(OesTxn *self); SWIGINTERN void OesTxn_rollback(OesTxn *self); SWIGINTERN OesKernel *new_OesKernel(OesDispatcher *dispatcher,OesThreadDispatcher *tdispatcher,OesStore *store,char *netspec,OesNet *net,char *username,char *pwd); SWIGINTERN void delete_OesKernel(OesKernel *self); SWIGINTERN OesLease *OesKernel_write(OesKernel *self,OesDataObject *slist,long dur,bool is_tuple); SWIGINTERN OesTxn *OesKernel_begin(OesKernel *self,long dur); SWIGINTERN void OesKernel_setCurrent(OesKernel *self,OesTxn *txn_holder); SWIGINTERN OesDataObjectList *OesKernel_read(OesKernel *self,OesDataObjectList *data,long timeout,bool is_tuple,int max_responses,bool return_attrs,bool return_bytes); SWIGINTERN OesDataObjectList *OesKernel_take(OesKernel *self,OesDataObjectList *data,long timeout,bool is_tuple,int max_responses,bool return_attrs,bool return_bytes); SWIGINTERN OesJsonKernel *new_OesJsonKernel(OesKernel *kernel); SWIGINTERN void delete_OesJsonKernel(OesJsonKernel *self); SWIGINTERN OesFuture *OesJsonKernel_exec(OesJsonKernel *self,char *json); SWIGINTERN void delete_OesFuture(OesFuture *self); SWIGINTERN char *OesFuture_getString(OesFuture *self,long timeout); static void SWIG_init_helper(void *data);
82ba03eb945af3c79bd80581dcdde8e18f1792592f061887196c690e468bbac4
588
kevinwang
minecarft
lib/LWJGL/lwjgl-source-2/src/native/generated/opengl/org_lwjgl_opengl_EXTDirectStateAccess.c
Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetTextureParameterIivEXT
JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetTextureParameterIivEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint pname, jlong params, jlong function_pointer) { GLint *params_address = (GLint *)(intptr_t)params; glGetTextureParameterIivEXTPROC glGetTextureParameterIivEXT = (glGetTextureParameterIivEXTPROC)((intptr_t)function_pointer); glGetTextureParameterIivEXT(texture, target, pname, params_address); }
JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglClientAttribDefaultEXT(JNIEnv *env, jclass clazz, jint mask, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglPushClientAttribDefaultEXT(JNIEnv *env, jclass clazz, jint mask, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixLoadfEXT(JNIEnv *env, jclass clazz, jint matrixMode, jlong m, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixLoaddEXT(JNIEnv *env, jclass clazz, jint matrixMode, jlong m, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixMultfEXT(JNIEnv *env, jclass clazz, jint matrixMode, jlong m, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixMultdEXT(JNIEnv *env, jclass clazz, jint matrixMode, jlong m, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixLoadIdentityEXT(JNIEnv *env, jclass clazz, jint matrixMode, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixRotatefEXT(JNIEnv *env, jclass clazz, jint matrixMode, jfloat angle, jfloat x, jfloat y, jfloat z, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixRotatedEXT(JNIEnv *env, jclass clazz, jint matrixMode, jdouble angle, jdouble x, jdouble y, jdouble z, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixScalefEXT(JNIEnv *env, jclass clazz, jint matrixMode, jfloat x, jfloat y, jfloat z, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixScaledEXT(JNIEnv *env, jclass clazz, jint matrixMode, jdouble x, jdouble y, jdouble z, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixTranslatefEXT(JNIEnv *env, jclass clazz, jint matrixMode, jfloat x, jfloat y, jfloat z, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixTranslatedEXT(JNIEnv *env, jclass clazz, jint matrixMode, jdouble x, jdouble y, jdouble z, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixOrthoEXT(JNIEnv *env, jclass clazz, jint matrixMode, jdouble l, jdouble r, jdouble b, jdouble t, jdouble n, jdouble f, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixFrustumEXT(JNIEnv *env, jclass clazz, jint matrixMode, jdouble l, jdouble r, jdouble b, jdouble t, jdouble n, jdouble f, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixPushEXT(JNIEnv *env, jclass clazz, jint matrixMode, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixPopEXT(JNIEnv *env, jclass clazz, jint matrixMode, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureParameteriEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint pname, jint param, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureParameterivEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint pname, jlong param, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureParameterfEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint pname, jfloat param, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureParameterfvEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint pname, jlong param, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureImage1DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint width, jint border, jint format, jint type, jlong pixels, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureImage1DEXTBO(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint width, jint border, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureImage2DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint format, jint type, jlong pixels, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureImage2DEXTBO(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureSubImage1DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint width, jint format, jint type, jlong pixels, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureSubImage1DEXTBO(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint width, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureSubImage2DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint type, jlong pixels, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureSubImage2DEXTBO(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCopyTextureImage1DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint x, jint y, jint width, jint border, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCopyTextureImage2DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint x, jint y, jint width, jint height, jint border, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCopyTextureSubImage1DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint x, jint y, jint width, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCopyTextureSubImage2DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint yoffset, jint x, jint y, jint width, jint height, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetTextureImageEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint format, jint type, jlong pixels, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetTextureImageEXTBO(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetTextureParameterfvEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint pname, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetTextureParameterivEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint pname, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetTextureLevelParameterfvEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint pname, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetTextureLevelParameterivEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint pname, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureImage3DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint format, jint type, jlong pixels, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureImage3DEXTBO(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureSubImage3DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint type, jlong pixels, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureSubImage3DEXTBO(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCopyTextureSubImage3DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint x, jint y, jint width, jint height, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglBindMultiTextureEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint texture, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexCoordPointerEXT(JNIEnv *env, jclass clazz, jint texunit, jint size, jint type, jint stride, jlong pointer, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexCoordPointerEXTBO(JNIEnv *env, jclass clazz, jint texunit, jint size, jint type, jint stride, jlong pointer_buffer_offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexEnvfEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint pname, jfloat param, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexEnvfvEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint pname, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexEnviEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint pname, jint param, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexEnvivEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint pname, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexGendEXT(JNIEnv *env, jclass clazz, jint texunit, jint coord, jint pname, jdouble param, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexGendvEXT(JNIEnv *env, jclass clazz, jint texunit, jint coord, jint pname, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexGenfEXT(JNIEnv *env, jclass clazz, jint texunit, jint coord, jint pname, jfloat param, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexGenfvEXT(JNIEnv *env, jclass clazz, jint texunit, jint coord, jint pname, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexGeniEXT(JNIEnv *env, jclass clazz, jint texunit, jint coord, jint pname, jint param, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexGenivEXT(JNIEnv *env, jclass clazz, jint texunit, jint coord, jint pname, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexEnvfvEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint pname, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexEnvivEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint pname, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexGendvEXT(JNIEnv *env, jclass clazz, jint texunit, jint coord, jint pname, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexGenfvEXT(JNIEnv *env, jclass clazz, jint texunit, jint coord, jint pname, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexGenivEXT(JNIEnv *env, jclass clazz, jint texunit, jint coord, jint pname, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexParameteriEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint pname, jint param, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexParameterivEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint pname, jlong param, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexParameterfEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint pname, jfloat param, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexParameterfvEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint pname, jlong param, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexImage1DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint width, jint border, jint format, jint type, jlong pixels, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexImage1DEXTBO(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint width, jint border, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexImage2DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint format, jint type, jlong pixels, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexImage2DEXTBO(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexSubImage1DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint width, jint format, jint type, jlong pixels, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexSubImage1DEXTBO(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint width, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexSubImage2DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint type, jlong pixels, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexSubImage2DEXTBO(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCopyMultiTexImage1DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint x, jint y, jint width, jint border, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCopyMultiTexImage2DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint x, jint y, jint width, jint height, jint border, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCopyMultiTexSubImage1DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint x, jint y, jint width, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCopyMultiTexSubImage2DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint yoffset, jint x, jint y, jint width, jint height, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexImageEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint format, jint type, jlong pixels, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexImageEXTBO(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexParameterfvEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint pname, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexParameterivEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint pname, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexLevelParameterfvEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint pname, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexLevelParameterivEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint pname, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexImage3DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint format, jint type, jlong pixels, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexImage3DEXTBO(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexSubImage3DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint type, jlong pixels, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexSubImage3DEXTBO(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCopyMultiTexSubImage3DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint x, jint y, jint width, jint height, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglEnableClientStateIndexedEXT(JNIEnv *env, jclass clazz, jint array, jint index, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglDisableClientStateIndexedEXT(JNIEnv *env, jclass clazz, jint array, jint index, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglEnableClientStateiEXT(JNIEnv *env, jclass clazz, jint array, jint index, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglDisableClientStateiEXT(JNIEnv *env, jclass clazz, jint array, jint index, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetFloatIndexedvEXT(JNIEnv *env, jclass clazz, jint pname, jint index, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetDoubleIndexedvEXT(JNIEnv *env, jclass clazz, jint pname, jint index, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetPointerIndexedvEXT(JNIEnv *env, jclass clazz, jint pname, jint index, jlong result_size, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetFloati_vEXT(JNIEnv *env, jclass clazz, jint pname, jint index, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetDoublei_vEXT(JNIEnv *env, jclass clazz, jint pname, jint index, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetPointeri_vEXT(JNIEnv *env, jclass clazz, jint pname, jint index, jlong result_size, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedProgramStringEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint format, jint len, jlong string, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedProgramLocalParameter4dEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint index, jdouble x, jdouble y, jdouble z, jdouble w, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedProgramLocalParameter4dvEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint index, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedProgramLocalParameter4fEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint index, jfloat x, jfloat y, jfloat z, jfloat w, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedProgramLocalParameter4fvEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint index, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetNamedProgramLocalParameterdvEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint index, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetNamedProgramLocalParameterfvEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint index, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetNamedProgramivEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint pname, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetNamedProgramStringEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint pname, jlong string, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedTextureImage3DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imageSize, jlong data, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedTextureImage3DEXTBO(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imageSize, jlong data_buffer_offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedTextureImage2DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint imageSize, jlong data, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedTextureImage2DEXTBO(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint imageSize, jlong data_buffer_offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedTextureImage1DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint width, jint border, jint imageSize, jlong data, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedTextureImage1DEXTBO(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint width, jint border, jint imageSize, jlong data_buffer_offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedTextureSubImage3DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint imageSize, jlong data, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedTextureSubImage3DEXTBO(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint imageSize, jlong data_buffer_offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedTextureSubImage2DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint imageSize, jlong data, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedTextureSubImage2DEXTBO(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint imageSize, jlong data_buffer_offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedTextureSubImage1DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint width, jint format, jint imageSize, jlong data, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedTextureSubImage1DEXTBO(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint width, jint format, jint imageSize, jlong data_buffer_offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetCompressedTextureImageEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jlong img, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetCompressedTextureImageEXTBO(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jlong img_buffer_offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedMultiTexImage3DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imageSize, jlong data, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedMultiTexImage3DEXTBO(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imageSize, jlong data_buffer_offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedMultiTexImage2DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint imageSize, jlong data, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedMultiTexImage2DEXTBO(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint imageSize, jlong data_buffer_offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedMultiTexImage1DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint width, jint border, jint imageSize, jlong data, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedMultiTexImage1DEXTBO(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint width, jint border, jint imageSize, jlong data_buffer_offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedMultiTexSubImage3DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint imageSize, jlong data, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedMultiTexSubImage3DEXTBO(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint imageSize, jlong data_buffer_offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedMultiTexSubImage2DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint imageSize, jlong data, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedMultiTexSubImage2DEXTBO(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint imageSize, jlong data_buffer_offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedMultiTexSubImage1DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint width, jint format, jint imageSize, jlong data, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedMultiTexSubImage1DEXTBO(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint width, jint format, jint imageSize, jlong data_buffer_offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetCompressedMultiTexImageEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jlong img, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetCompressedMultiTexImageEXTBO(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jlong img_buffer_offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixLoadTransposefEXT(JNIEnv *env, jclass clazz, jint matrixMode, jlong m, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixLoadTransposedEXT(JNIEnv *env, jclass clazz, jint matrixMode, jlong m, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixMultTransposefEXT(JNIEnv *env, jclass clazz, jint matrixMode, jlong m, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixMultTransposedEXT(JNIEnv *env, jclass clazz, jint matrixMode, jlong m, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedBufferDataEXT(JNIEnv *env, jclass clazz, jint buffer, jlong size, jlong data, jint usage, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedBufferSubDataEXT(JNIEnv *env, jclass clazz, jint buffer, jlong offset, jlong size, jlong data, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMapNamedBufferEXT(JNIEnv *env, jclass clazz, jint buffer, jint access, jlong result_size, jobject old_buffer, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglUnmapNamedBufferEXT(JNIEnv *env, jclass clazz, jint buffer, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetNamedBufferParameterivEXT(JNIEnv *env, jclass clazz, jint buffer, jint pname, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetNamedBufferPointervEXT(JNIEnv *env, jclass clazz, jint buffer, jint pname, jlong result_size, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetNamedBufferSubDataEXT(JNIEnv *env, jclass clazz, jint buffer, jlong offset, jlong size, jlong data, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform1fEXT(JNIEnv *env, jclass clazz, jint program, jint location, jfloat v0, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform2fEXT(JNIEnv *env, jclass clazz, jint program, jint location, jfloat v0, jfloat v1, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform3fEXT(JNIEnv *env, jclass clazz, jint program, jint location, jfloat v0, jfloat v1, jfloat v2, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform4fEXT(JNIEnv *env, jclass clazz, jint program, jint location, jfloat v0, jfloat v1, jfloat v2, jfloat v3, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform1iEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint v0, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform2iEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint v0, jint v1, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform3iEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint v0, jint v1, jint v2, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform4iEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint v0, jint v1, jint v2, jint v3, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform1fvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform2fvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform3fvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform4fvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform1ivEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform2ivEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform3ivEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform4ivEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniformMatrix2fvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniformMatrix3fvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniformMatrix4fvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniformMatrix2x3fvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniformMatrix3x2fvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniformMatrix2x4fvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniformMatrix4x2fvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniformMatrix3x4fvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniformMatrix4x3fvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureBufferEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint internalformat, jint buffer, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexBufferEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint internalformat, jint buffer, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureParameterIivEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint pname, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureParameterIuivEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint pname, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetTextureParameterIuivEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint pname, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexParameterIivEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint pname, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexParameterIuivEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint pname, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexParameterIivEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint pname, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexParameterIuivEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint pname, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform1uiEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint v0, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform2uiEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint v0, jint v1, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform3uiEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint v0, jint v1, jint v2, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform4uiEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint v0, jint v1, jint v2, jint v3, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform1uivEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform2uivEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform3uivEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform4uivEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedProgramLocalParameters4fvEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint index, jint count, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedProgramLocalParameterI4iEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint index, jint x, jint y, jint z, jint w, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedProgramLocalParameterI4ivEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint index, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedProgramLocalParametersI4ivEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint index, jint count, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedProgramLocalParameterI4uiEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint index, jint x, jint y, jint z, jint w, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedProgramLocalParameterI4uivEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint index, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedProgramLocalParametersI4uivEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint index, jint count, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetNamedProgramLocalParameterIivEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint index, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetNamedProgramLocalParameterIuivEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint index, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedRenderbufferStorageEXT(JNIEnv *env, jclass clazz, jint renderbuffer, jint internalformat, jint width, jint height, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetNamedRenderbufferParameterivEXT(JNIEnv *env, jclass clazz, jint renderbuffer, jint pname, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedRenderbufferStorageMultisampleEXT(JNIEnv *env, jclass clazz, jint renderbuffer, jint samples, jint internalformat, jint width, jint height, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedRenderbufferStorageMultisampleCoverageEXT(JNIEnv *env, jclass clazz, jint renderbuffer, jint coverageSamples, jint colorSamples, jint internalformat, jint width, jint height, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCheckNamedFramebufferStatusEXT(JNIEnv *env, jclass clazz, jint framebuffer, jint target, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedFramebufferTexture1DEXT(JNIEnv *env, jclass clazz, jint framebuffer, jint attachment, jint textarget, jint texture, jint level, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedFramebufferTexture2DEXT(JNIEnv *env, jclass clazz, jint framebuffer, jint attachment, jint textarget, jint texture, jint level, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedFramebufferTexture3DEXT(JNIEnv *env, jclass clazz, jint framebuffer, jint attachment, jint textarget, jint texture, jint level, jint zoffset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedFramebufferRenderbufferEXT(JNIEnv *env, jclass clazz, jint framebuffer, jint attachment, jint renderbuffertarget, jint renderbuffer, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetNamedFramebufferAttachmentParameterivEXT(JNIEnv *env, jclass clazz, jint framebuffer, jint attachment, jint pname, jlong params, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGenerateTextureMipmapEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGenerateMultiTexMipmapEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglFramebufferDrawBufferEXT(JNIEnv *env, jclass clazz, jint framebuffer, jint mode, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglFramebufferDrawBuffersEXT(JNIEnv *env, jclass clazz, jint framebuffer, jint n, jlong bufs, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglFramebufferReadBufferEXT(JNIEnv *env, jclass clazz, jint framebuffer, jint mode, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetFramebufferParameterivEXT(JNIEnv *env, jclass clazz, jint framebuffer, jint pname, jlong param, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedCopyBufferSubDataEXT(JNIEnv *env, jclass clazz, jint readBuffer, jint writeBuffer, jlong readoffset, jlong writeoffset, jlong size, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedFramebufferTextureEXT(JNIEnv *env, jclass clazz, jint framebuffer, jint attachment, jint texture, jint level, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedFramebufferTextureLayerEXT(JNIEnv *env, jclass clazz, jint framebuffer, jint attachment, jint texture, jint level, jint layer, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedFramebufferTextureFaceEXT(JNIEnv *env, jclass clazz, jint framebuffer, jint attachment, jint texture, jint level, jint face, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureRenderbufferEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint renderbuffer, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexRenderbufferEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint renderbuffer, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglVertexArrayVertexOffsetEXT(JNIEnv *env, jclass clazz, jint vaobj, jint buffer, jint size, jint type, jint stride, jlong offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglVertexArrayColorOffsetEXT(JNIEnv *env, jclass clazz, jint vaobj, jint buffer, jint size, jint type, jint stride, jlong offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglVertexArrayEdgeFlagOffsetEXT(JNIEnv *env, jclass clazz, jint vaobj, jint buffer, jint stride, jlong offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglVertexArrayIndexOffsetEXT(JNIEnv *env, jclass clazz, jint vaobj, jint buffer, jint type, jint stride, jlong offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglVertexArrayNormalOffsetEXT(JNIEnv *env, jclass clazz, jint vaobj, jint buffer, jint type, jint stride, jlong offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglVertexArrayTexCoordOffsetEXT(JNIEnv *env, jclass clazz, jint vaobj, jint buffer, jint size, jint type, jint stride, jlong offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglVertexArrayMultiTexCoordOffsetEXT(JNIEnv *env, jclass clazz, jint vaobj, jint buffer, jint texunit, jint size, jint type, jint stride, jlong offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglVertexArrayFogCoordOffsetEXT(JNIEnv *env, jclass clazz, jint vaobj, jint buffer, jint type, jint stride, jlong offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglVertexArraySecondaryColorOffsetEXT(JNIEnv *env, jclass clazz, jint vaobj, jint buffer, jint size, jint type, jint stride, jlong offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglVertexArrayVertexAttribOffsetEXT(JNIEnv *env, jclass clazz, jint vaobj, jint buffer, jint index, jint size, jint type, jboolean normalized, jint stride, jlong offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglVertexArrayVertexAttribIOffsetEXT(JNIEnv *env, jclass clazz, jint vaobj, jint buffer, jint index, jint size, jint type, jint stride, jlong offset, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglEnableVertexArrayEXT(JNIEnv *env, jclass clazz, jint vaobj, jint array, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglDisableVertexArrayEXT(JNIEnv *env, jclass clazz, jint vaobj, jint array, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglEnableVertexArrayAttribEXT(JNIEnv *env, jclass clazz, jint vaobj, jint index, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglDisableVertexArrayAttribEXT(JNIEnv *env, jclass clazz, jint vaobj, jint index, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetVertexArrayIntegervEXT(JNIEnv *env, jclass clazz, jint vaobj, jint pname, jlong param, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetVertexArrayPointervEXT(JNIEnv *env, jclass clazz, jint vaobj, jint pname, jlong result_size, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetVertexArrayIntegeri_vEXT(JNIEnv *env, jclass clazz, jint vaobj, jint index, jint pname, jlong param, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetVertexArrayPointeri_vEXT(JNIEnv *env, jclass clazz, jint vaobj, jint index, jint pname, jlong result_size, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMapNamedBufferRangeEXT(JNIEnv *env, jclass clazz, jint buffer, jlong offset, jlong length, jint access, jobject old_buffer, jlong function_pointer); JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglFlushMappedNamedBufferRangeEXT(JNIEnv *env, jclass clazz, jint buffer, jlong offset, jlong length, jlong function_pointer);
c1dc2881b51c2cab408bbc93c9a55fcee6469dc26dde1f1b31ef50344f0017b3
440
HellicarAndLewis
Caravideo
FFmpegLibrary/jni/x264/common/threadpool.c
x264_threadpool_init
int x264_threadpool_init( x264_threadpool_t **p_pool, int threads, void (*init_func)(void *), void *init_arg ) { if( threads <= 0 ) return -1; x264_threadpool_t *pool; CHECKED_MALLOCZERO( pool, sizeof(x264_threadpool_t) ); *p_pool = pool; pool->init_func = init_func; pool->init_arg = init_arg; pool->threads = threads; CHECKED_MALLOC( pool->thread_handle, pool->threads * sizeof(x264_pthread_t) ); if( x264_sync_frame_list_init( &pool->uninit, pool->threads ) || x264_sync_frame_list_init( &pool->run, pool->threads ) || x264_sync_frame_list_init( &pool->done, pool->threads ) ) goto fail; for( int i = 0; i < pool->threads; i++ ) { x264_threadpool_job_t *job; CHECKED_MALLOC( job, sizeof(x264_threadpool_job_t) ); x264_sync_frame_list_push( &pool->uninit, (void*)job ); } for( int i = 0; i < pool->threads; i++ ) if( x264_pthread_create( pool->thread_handle+i, NULL, (void*)x264_threadpool_thread, pool ) ) goto fail; return 0; fail: return -1; }
static void x264_threadpool_thread( x264_threadpool_t *pool ); void x264_threadpool_run( x264_threadpool_t *pool, void *(*func); void *x264_threadpool_wait( x264_threadpool_t *pool, void *arg ); static void x264_threadpool_list_delete( x264_sync_frame_list_t *slist ); void x264_threadpool_delete( x264_threadpool_t *pool );
a835600ed65001c453abde5792c502b9e355ad06861a96616127ca8c390d1656
1,117
yodiwo
plegma
C/linux_node/libsrc/mongoose/mongoose.c
handle_mkcol
static void handle_mkcol(struct mg_connection *nc, const char *path, struct http_message *hm) { int status_code = 500; if (mg_get_http_header(hm, "Content-Length") != NULL) { status_code = 415; } else if (!mg_mkdir(path, 0755)) { status_code = 201; } else if (errno == EEXIST) { status_code = 405; } else if (errno == EACCES) { status_code = 403; } else if (errno == ENOENT) { status_code = 409; } send_http_error(nc, status_code, NULL); }
void mbuf_init(struct mbuf *mbuf, size_t initial_size); void mbuf_free(struct mbuf *mbuf); void mbuf_resize(struct mbuf *a, size_t new_size); void mbuf_trim(struct mbuf *mbuf); size_t mbuf_insert(struct mbuf *a, size_t off, const void *buf, size_t len); size_t mbuf_append(struct mbuf *a, const void *buf, size_t len); void mbuf_remove(struct mbuf *mb, size_t n); static uint32_t blk0(union char64long16 *block, int i); void cs_sha1_transform(uint32_t state[5], const unsigned char buffer[64]); void cs_sha1_init(cs_sha1_ctx *context); void cs_sha1_update(cs_sha1_ctx *context, const unsigned char *data, uint32_t len); void cs_sha1_final(unsigned char digest[20], cs_sha1_ctx *context); static void byteReverse(unsigned char *buf, unsigned longs); void MD5_Init(MD5_CTX *ctx); static void MD5Transform(uint32_t buf[4], uint32_t const in[16]); void MD5_Update(MD5_CTX *ctx, const unsigned char *buf, size_t len); void MD5_Final(unsigned char digest[16], MD5_CTX *ctx); void cs_base64_encode(const unsigned char *src, int src_len, char *dst); void cs_fprint_base64(FILE *f, const unsigned char *src, int src_len); static unsigned char from_b64(unsigned char ch); int cs_base64_decode(const unsigned char *s, int len, char *dst); int strnlen(const char *s, size_t maxlen); int c_vsnprintf(char *buf, size_t buf_size, const char *fmt, va_list ap); int c_vsnprintf(char *buf, size_t buf_size, const char *fmt, va_list ap); int c_snprintf(char *buf, size_t buf_size, const char *fmt, ...); void to_wchar(const char *path, wchar_t *wbuf, size_t wbuf_len); DIR *opendir(const char *name); int closedir(DIR *dir); struct dirent *readdir(DIR *dir); static int left(const struct frozen *f); static int is_space(int ch); static void skip_whitespaces(struct frozen *f); static int cur(struct frozen *f); static int test_and_skip(struct frozen *f, int expected); static int is_alpha(int ch); static int is_digit(int ch); static int is_hex_digit(int ch); static int get_escape_len(const char *s, int len); static int capture_ptr(struct frozen *f, const char *ptr, enum json_type type); static int capture_len(struct frozen *f, int token_index, const char *ptr); static int parse_identifier(struct frozen *f); static int get_utf8_char_len(unsigned char ch); static int parse_string(struct frozen *f); static int parse_number(struct frozen *f); static int parse_array(struct frozen *f); static int compare(const char *s, const char *str, int len); static int expect(struct frozen *f, const char *s, int len, enum json_type t); static int parse_value(struct frozen *f); static int parse_key(struct frozen *f); static int parse_pair(struct frozen *f); static int parse_object(struct frozen *f); static int doit(struct frozen *f); int parse_json(const char *s, int s_len, struct json_token *arr, int arr_len); struct json_token *parse_json2(const char *s, int s_len); static int path_part_len(const char *p); struct json_token *find_json_token(struct json_token *toks, const char *path); int json_emit_long(char *buf, int buf_len, long int value); int json_emit_double(char *buf, int buf_len, double value); int json_emit_quoted_str(char *s, int s_len, const char *str, int len); int json_emit_unquoted_str(char *buf, int buf_len, const char *str, int len); int json_emit_va(char *s, int s_len, const char *fmt, va_list ap); int json_emit(char *buf, int buf_len, const char *fmt, ...); NS_INTERNAL void mg_add_conn(struct mg_mgr *mgr, struct mg_connection *c); NS_INTERNAL void mg_remove_conn(struct mg_connection *conn); NS_INTERNAL void mg_call(struct mg_connection *nc, int ev, void *ev_data); static size_t mg_out(struct mg_connection *nc, const void *buf, size_t len); static void mg_destroy_conn(struct mg_connection *conn); static void mg_close_conn(struct mg_connection *conn); void mg_mgr_init(struct mg_mgr *s, void *user_data); void mg_mgr_free(struct mg_mgr *s); int mg_vprintf(struct mg_connection *nc, const char *fmt, va_list ap); int mg_printf(struct mg_connection *conn, const char *fmt, ...); static void mg_set_non_blocking_mode(sock_t sock); int mg_socketpair(sock_t sp[2], int sock_type); static int mg_resolve2(const char *host, struct in_addr *ina); int mg_resolve(const char *host, char *buf, size_t n); NS_INTERNAL void mg_set_sock(struct mg_connection *nc, sock_t sock); static sock_t mg_open_listening_socket(union socket_address *sa, int proto); static int mg_use_ca_cert(SSL_CTX *ctx, const char *cert); static int mg_ssl_err(struct mg_connection *conn, int res); static struct mg_connection *accept_conn(struct mg_connection *ls); static int mg_is_error(int n); static size_t recv_avail_size(struct mg_connection *conn, size_t max); static void mg_ssl_begin(struct mg_connection *nc); static void mg_read_from_socket(struct mg_connection *conn); static void mg_write_to_socket(struct mg_connection *conn); int mg_send(struct mg_connection *conn, const void *buf, int len); static void mg_handle_udp(struct mg_connection *ls); static void mg_mgr_handle_ctl_sock(struct mg_mgr *mgr); static uint32_t mg_epf_to_evflags(unsigned int epf); static void mg_ev_mgr_epoll_ctl(struct mg_connection *nc, int op); static void mg_ev_mgr_init(struct mg_mgr *mgr); static void mg_ev_mgr_free(struct mg_mgr *mgr); static void mg_ev_mgr_add_conn(struct mg_connection *nc); static void mg_ev_mgr_remove_conn(struct mg_connection *nc); time_t mg_mgr_poll(struct mg_mgr *mgr, int timeout_ms); static void mg_ev_mgr_init(struct mg_mgr *mgr); static void mg_ev_mgr_free(struct mg_mgr *mgr); static void mg_ev_mgr_add_conn(struct mg_connection *nc); static void mg_ev_mgr_remove_conn(struct mg_connection *nc); static void mg_add_to_set(sock_t sock, fd_set *set, sock_t *max_fd); time_t mg_mgr_poll(struct mg_mgr *mgr, int milli); static void resolve_cb(struct mg_dmg_message *msg, void *data); struct mg_connection *mg_next(struct mg_mgr *s, struct mg_connection *conn); static int isbyte(int n); static int parse_net(const char *spec, uint32_t *net, uint32_t *mask); int mg_check_ip_acl(const char *acl, uint32_t remote_ip); void mg_forward(struct mg_connection *from, struct mg_connection *to); static void *per_connection_thread_function(void *param); static void link_conns(struct mg_connection *c1, struct mg_connection *c2); static void unlink_conns(struct mg_connection *c); static void forwarder_ev_handler(struct mg_connection *c, int ev, void *p); static void spawn_handling_thread(struct mg_connection *nc); static void multithreaded_ev_handler(struct mg_connection *c, int ev, void *p); void mg_enable_multithreading(struct mg_connection *nc); static int mg_mkdir(const char *path, uint32_t mode); static int get_request_len(const char *s, int buf_len); int mg_parse_http(const char *s, int n, struct http_message *hm, int is_req); struct mg_str *mg_get_http_header(struct http_message *hm, const char *name); static int is_ws_fragment(unsigned char flags); static int is_ws_first_fragment(unsigned char flags); static int deliver_websocket_data(struct mg_connection *nc); static uint32_t ws_random_mask(); static void ws_mask_frame(struct mbuf *mbuf, struct ws_mask_ctx *ctx); static void websocket_handler(struct mg_connection *nc, int ev, void *ev_data); static void ws_handshake(struct mg_connection *nc, const struct mg_str *key); static void free_http_proto_data(struct mg_connection *nc); static void transfer_file_data(struct mg_connection *nc); static void http_handler(struct mg_connection *nc, int ev, void *ev_data); void mg_set_protocol_http_websocket(struct mg_connection *nc); static void send_file_data(struct mg_connection *nc, FILE *fp); static void do_ssi_exec(struct mg_connection *nc, char *tag); static void do_ssi_call(struct mg_connection *nc, char *tag); static void construct_etag(char *buf, size_t buf_len, const cs_stat_t *st); static void gmt_time_string(char *buf, size_t buf_len, time_t *t); static void remove_double_dots(char *s); void mg_send_http_chunk(struct mg_connection *nc, const char *buf, size_t len); void mg_printf_http_chunk(struct mg_connection *nc, const char *fmt, ...); void mg_printf_html_escape(struct mg_connection *nc, const char *fmt, ...); static void bin2str(char *to, const unsigned char *p, size_t len); static char *mg_md5(char *buf, ...); static int check_nonce(const char *nonce); static void escape(const char *src, char *dst, size_t dst_len); static int remove_directory(const char *dir); static void handle_delete(struct mg_connection *nc, const char *path); static int create_itermediate_directories(const char *path); static int is_dav_request(const struct mg_str *s); static int wait_until_ready(sock_t sock, int for_read); static void *push_to_stdin(void *arg); static void *pull_from_stdout(void *arg); static void abs_path(const char *utf8_path, char *abs_path, size_t len); static char *addenv(struct cgi_env_block *block, const char *fmt, ...); static void addenv2(struct cgi_env_block *blk, const char *name); else if (mg_match_prefix(opts->cgi_file_pattern, strlen(opts->cgi_file_pattern); static size_t get_line_len(const char *buf, size_t buf_len); static int lowercase(const char *s); int mg_ncasecmp(const char *s1, const char *s2, size_t len); int mg_casecmp(const char *s1, const char *s2); int mg_vcasecmp(const struct mg_str *str1, const char *str2); int mg_vcmp(const struct mg_str *str1, const char *str2); int mg_stat(const char *path, cs_stat_t *st); FILE *mg_fopen(const char *path, const char *mode); int mg_open(const char *path, int flag, int mode); void mg_base64_encode(const unsigned char *src, int src_len, char *dst); int mg_base64_decode(const unsigned char *s, int len, char *dst); void *mg_start_thread(void *(*f); void mg_set_close_on_exec(sock_t sock); void mg_sock_to_str(sock_t sock, char *buf, size_t len, int flags); int mg_hexdump(const void *buf, int len, char *dst, int dst_len); int mg_avprintf(char **buf, size_t size, const char *fmt, va_list ap); int mg_is_big_endian(void); int mg_match_prefix(const char *pattern, int pattern_len, const char *str); static int parse_mqtt(struct mbuf *io, struct mg_mqtt_message *mm); static void mqtt_handler(struct mg_connection *nc, int ev, void *ev_data); void mg_set_protocol_mqtt(struct mg_connection *nc); void mg_send_mqtt_handshake(struct mg_connection *nc, const char *client_id); void mg_mqtt_connack(struct mg_connection *nc, uint8_t return_code); void mg_mqtt_puback(struct mg_connection *nc, uint16_t message_id); void mg_mqtt_pubrec(struct mg_connection *nc, uint16_t message_id); void mg_mqtt_pubrel(struct mg_connection *nc, uint16_t message_id); void mg_mqtt_pubcomp(struct mg_connection *nc, uint16_t message_id); void mg_mqtt_unsuback(struct mg_connection *nc, uint16_t message_id); void mg_mqtt_ping(struct mg_connection *nc); void mg_mqtt_pong(struct mg_connection *nc); void mg_mqtt_disconnect(struct mg_connection *nc); static void mg_mqtt_add_session(struct mg_mqtt_session *s); static void mg_mqtt_remove_session(struct mg_mqtt_session *s); static void mg_mqtt_destroy_session(struct mg_mqtt_session *s); static void mg_mqtt_close_session(struct mg_mqtt_session *s); void mg_mqtt_broker_init(struct mg_mqtt_broker *brk, void *user_data); static int mg_mqtt_match_topic_expression(const char *exp, const char *topic); void mg_mqtt_broker(struct mg_connection *nc, int ev, void *data); int mg_dmg_copy_body(struct mbuf *io, struct mg_dmg_message *msg); static int mg_dmg_encode_name(struct mbuf *io, const char *name, size_t len); int mg_parse_dns(const char *buf, int len, struct mg_dmg_message *msg); static void dmg_handler(struct mg_connection *nc, int ev, void *ev_data); void mg_set_protocol_dns(struct mg_connection *nc); int mg_dmg_send_reply(struct mg_connection *nc, struct mg_dmg_reply *r); static int mg_get_ip_address_of_nameserver(char *name, size_t name_len); int mg_resolve_from_hosts_file(const char *name, union socket_address *usa); static void mg_resolve_async_eh(struct mg_connection *nc, int ev, void *data); void mg_coap_free_options(struct mg_coap_message *cm); static int coap_get_ext_opt(char *ptr, struct mbuf *io, uint16_t *opt_info); uint32_t mg_coap_parse(struct mbuf *io, struct mg_coap_message *cm); static size_t coap_get_ext_opt_size(uint32_t value); static int coap_split_opt(uint32_t value, uint8_t *base, uint16_t *ext); static char *coap_add_uint16(char *ptr, uint16_t val); static char *coap_add_opt_info(char *ptr, uint16_t val, size_t len); uint32_t mg_coap_compose(struct mg_coap_message *cm, struct mbuf *io); uint32_t mg_coap_send_ack(struct mg_connection *nc, uint16_t msg_id); static void coap_handler(struct mg_connection *nc, int ev, void *ev_data); int mg_set_protocol_coap(struct mg_connection *nc);
7b7e8146357d23619373693edfd7ecc945eb5ef2d844a0443118223baa808d20
501
ryfeus
lambda-packs
HDF4_H5_NETCDF/source2.7/Cython/Utility/Embed.c
__Pyx_main
static int __Pyx_main(int argc, wchar_t **argv) { #endif #ifdef __FreeBSD__ fp_except_t m; m = fpgetmask(); fpsetmask(m & ~FP_X_OFL); #endif if (argc && argv) Py_SetProgramName(argv[0]); Py_Initialize(); if (argc && argv) PySys_SetArgv(argc, argv); { PyObject* m = NULL; %(module_is_main)s = 1; #if PY_MAJOR_VERSION < 3 init%(module_name)s(); #elif CYTHON_PEP489_MULTI_PHASE_INIT m = PyInit_%(module_name)s(); if (!PyModule_Check(m)) { PyModuleDef *mdef = (PyModuleDef *) m; PyObject *modname = PyUnicode_FromString("__main__"); m = NULL; if (modname) { m = PyModule_NewObject(modname); Py_DECREF(modname); if (m) PyModule_ExecDef(m, mdef); } } #else m = PyInit_%(module_name)s(); #endif if (PyErr_Occurred()) { PyErr_Print(); #if PY_MAJOR_VERSION < 3 if (Py_FlushLine()) PyErr_Clear(); #endif return 1; } Py_XDECREF(m); } Py_Finalize(); return 0; }
7432c71159d02b4ddc849edd5de6948703728c5fc86c4911e43f6a3caba7b7f9
1,235
ayoubg
gem5-graphics
Mesa-7.11.2_GPGPU-Sim/src/egl/wayland/wayland-drm/wayland-drm.c
* wayland_drm_init
uct wl_drm * wayland_drm_init(struct wl_display *display, char *device_name, struct wayland_drm_callbacks *callbacks, void *user_data) { struct wl_drm *drm; drm = malloc(sizeof *drm); drm->display = display; drm->device_name = strdup(device_name); drm->callbacks = callbacks; drm->user_data = user_data; drm->object.interface = &wl_drm_interface; drm->object.implementation = (void (**)(void)) &drm_interface; wl_display_add_object(display, &drm->object); wl_display_add_global(display, &drm->object, post_drm_device); return drm; } vo
tic void destroy_buffer(struct wl_resource *resource, struct wl_client *client); tic void buffer_destroy(struct wl_client *client, struct wl_buffer *buffer); d wayland_drm_uninit(struct wl_drm *drm); wayland_buffer_is_drm(struct wl_buffer *buffer); d * wayland_drm_buffer_get_buffer(struct wl_buffer *buffer_base);
5174447ea81e5c57b700dd4cdb3ee36c373103bb4014375d5788c0e4c2b9bf59
568
lirenjie95
MCS-51Experiment
TemperatureControl/C-51/temper.c
get_temper
void get_temper(){ temper=display[2]*100+display[1]*10+display[0]; set_temper=p_2*100+p_1*10+p_0; }
void delay(unsigned int t); int PIDCalc( struct PID *pp, unsigned int NextPoint ); t = PIDCalc ( &spid,rin ); lay(100); isplay[0]); );
004d7c46eae48cf1a21fbf986eff873d02e614cda2c330c4ae8144990e41f5ae
105
Tetpay
cjdns
ref_code/cjdns/switch/test/LabelSplicer_test.c
main
int main() { splice(); isOneHop(); routesThrough(); unsplice(); return 0; }
static void unsplice(); static void splice(); static uint64_t routeToInterface(uint32_t number); static void isOneHop(); static void routesThrough();
334158187a7f532860bd561cc4743b536b8e799e8dba620a73d98570531219b3
96
Nils-TUD
Escape
source/user/mount/mount.c
usage
static void usage(const char *name) { fprintf(stderr,"Usage: %s [--ms <ms>] [-p <perms>] <device> <path> <fs>\n",name); fprintf(stderr," Creates a child process that executes <fs>. <fs> receives\n"); fprintf(stderr," the fs-device to create and the device to work with (<device>)\n"); fprintf(stderr," as command line arguments. Afterwards, mount opens the\n"); fprintf(stderr," created fs-device and mounts it at <path>.\n"); fprintf(stderr,"\n"); fprintf(stderr," Example: %s /dev/hda1 /mnt /sbin/ext2.\n",name); fprintf(stderr,"\n"); fprintf(stderr," -p <perms>: set the permissions to <perms>, which is a combination\n"); fprintf(stderr," of the letters r, w and x (rwx by default).\n"); fprintf(stderr," --ms <ms>: By default, the current mountspace (/sys/pid/self/ms)\n"); fprintf(stderr," will be used. This can be overwritten by specifying\n"); fprintf(stderr," --ms <ms>.\n"); exit(EXIT_FAILURE); }
static void sigchild(A_UNUSED int sig); static void cleanup(int pid); int main(int argc,char *argv[]);
c268e7b987e4963873be1a3b54760629af0cf005bfa035baddd64b499a50fc95
989
savonet
ocaml-ffmpeg
avutil/avutil_stubs.c
ocaml_avutil_avopt_default_int64
CAMLprim value ocaml_avutil_avopt_default_int64(value _opt) { CAMLparam0(); CAMLreturn(caml_copy_int64(AvOptions_val(_opt)->default_val.i64)); }
void ocaml_avutil_raise_error(int err); CAMLprim value ocaml_avutil_qp2lambda(value unit); CAMLprim value ocaml_avutil_string_of_error(value error); static void ocaml_ffmpeg_on_thread_exit(void *key); static void ocaml_ffmpeg_make_key(); void ocaml_ffmpeg_register_thread(); void value_of_rational(const AVRational *rational, value *pvalue); value ocaml_avutil_av_d2q(value f); int64_t second_fractions_of_time_format(value time_format); CAMLprim value ocaml_avutil_set_log_level(value level); CAMLprim value ocaml_ffmpeg_process_log(value cb); CAMLprim value ocaml_avutil_setup_log_callback(value unit); CAMLprim value ocaml_avutil_clear_log_callback(); CAMLprim value ocaml_avutil_time_base(); CAMLprim value ocaml_avutil_get_default_channel_layout(value _nb_channels); CAMLprim value ocaml_avutil_get_channel_layout(value _name); CAMLprim value ocaml_avutil_get_channel_layout_id(value _channel_layout); CAMLprim value ocaml_avutil_channel_layout_of_id(value v); enum caml_ba_kind bigarray_kind_of_AVSampleFormat(enum AVSampleFormat sf); CAMLprim value ocaml_avutil_find_sample_fmt(value _name); CAMLprim value ocaml_avutil_get_sample_fmt_name(value _sample_fmt); CAMLprim value ocaml_avutil_get_sample_fmt_id(value _sample_fmt); CAMLprim value ocaml_avutil_find_sample_fmt_from_id(value _id); CAMLprim value ocaml_avutil_pixelformat_descriptor(value pixel); CAMLprim value ocaml_avutil_pixelformat_bits_per_pixel(value d); CAMLprim value ocaml_avutil_pixelformat_planes(value pixel); CAMLprim value ocaml_avutil_get_pixel_fmt_id(value _pixel_fmt); CAMLprim value ocaml_avutil_find_pixel_fmt_from_id(value _id); CAMLprim value ocaml_avutil_pixelformat_to_string(value pixel); CAMLprim value ocaml_avutil_pixelformat_of_string(value name); static void finalize_frame(value v); value value_of_frame(AVFrame *frame); CAMLprim value ocaml_avutil_frame_pkt_duration(value _frame); CAMLprim value ocaml_avutil_frame_pts(value _frame); CAMLprim value ocaml_avutil_frame_set_pts(value _frame, value _pts); CAMLprim value ocaml_avutil_frame_metadata(value _frame); CAMLprim value ocaml_avutil_frame_set_metadata(value _frame, value _metadata); CAMLprim value ocaml_avutil_frame_best_effort_timestamp(value _frame); CAMLprim value ocaml_avutil_frame_copy(value _src, value _dst); CAMLprim value ocaml_avutil_audio_frame_get_sample_format(value _frame); CAMLprim value ocaml_avutil_audio_frame_get_sample_rate(value _frame); CAMLprim value ocaml_avutil_audio_frame_get_channels(value _frame); CAMLprim value ocaml_avutil_audio_frame_get_channel_layout(value _frame); CAMLprim value ocaml_avutil_audio_frame_nb_samples(value _frame); CAMLprim value ocaml_avutil_video_frame_width(value _frame); CAMLprim value ocaml_avutil_video_frame_height(value _frame); CAMLprim value ocaml_avutil_video_frame_get_pixel_format(value _frame); CAMLprim value ocaml_avutil_video_frame_get_pixel_aspect(value _frame); void static finalize_subtitle(value v); value value_of_subtitle(AVSubtitle *subtitle); CAMLprim value ocaml_avutil_subtitle_to_lines(value _subtitle); CAMLprim value ocaml_avutil_av_opt_iter(value _cursor, value _class); CAMLprim value ocaml_avutil_avopt_default_double(value _opt); CAMLprim value ocaml_avutil_avopt_default_string(value _opt); CAMLprim value ocaml_avutil_av_opt_int_of_flag(value _flag);
81a7d99deb9e30d9581a219fb1dd2ae0d79d82b25706ce175ffff19bf306ae36
149
ccryx
i3
src/click.c
handle_button_press
handle_button_press(xcb_button_press_event_t *event) { Con *con; DLOG("Button %d (state %d) %s on window 0x%08x (child 0x%08x) at (%d, %d) (root %d, %d)\n", event->detail, event->state, (event->response_type == XCB_BUTTON_PRESS ? "press" : "release"), event->event, event->child, event->event_x, event->event_y, event->root_x, event->root_y); last_timestamp = event->time; const uint32_t mod = (config.floating_modifier & 0xFFFF); const bool mod_pressed = (mod != 0 && (event->state & mod) == mod); DLOG("floating_mod = %d, detail = %d\n", mod_pressed, event->detail); if ((con = con_by_window_id(event->event))) return route_click(con, event, mod_pressed, CLICK_INSIDE); if (!(con = con_by_frame_id(event->event))) { if (event->event == root) { Binding *bind = get_binding_from_xcb_event((xcb_generic_event_t *)event); if (bind != NULL && bind->whole_window) { CommandResult *result = run_binding(bind, NULL); if (result->needs_tree_render) { tree_render(); } command_result_free(result); } } if (event->event == root && event->response_type == XCB_BUTTON_PRESS) { Con *output, *ws; TAILQ_FOREACH(output, &(croot->nodes_head), nodes) { if (con_is_internal(output) || !rect_contains(output->rect, event->event_x, event->event_y)) continue; ws = TAILQ_FIRST(&(output_get_content(output)->focus_head)); if (ws != con_get_workspace(focused)) { workspace_show(ws); tree_render(); } return 1; } return 0; } ELOG("Clicked into unknown window?!\n"); xcb_allow_events(conn, XCB_ALLOW_REPLAY_POINTER, event->time); xcb_flush(conn); return 0; } Con *child; TAILQ_FOREACH(child, &(con->nodes_head), nodes) { if (!rect_contains(child->deco_rect, event->event_x, event->event_y)) continue; return route_click(child, event, mod_pressed, CLICK_DECORATION); } if (event->child != XCB_NONE) { DLOG("event->child not XCB_NONE, so this is an event which originated from a click into the application, but the application did not handle it.\n"); return route_click(con, event, mod_pressed, CLICK_INSIDE); } return route_click(con, event, mod_pressed, CLICK_BORDER); }
static bool tiling_resize_for_border(Con *con, border_t border, xcb_button_press_event_t *event); static bool floating_mod_on_tiled_client(Con *con, xcb_button_press_event_t *event); static bool tiling_resize(Con *con, xcb_button_press_event_t *event, const click_destination_t dest); static int route_click(Con *con, xcb_button_press_event_t *event, const bool mod_pressed, const click_destination_t dest);
fccf7cd8868f8959763f658f813f17978d2d0c134d0ef19cf4822c7c441da546
2,615
endlessm
chromium-browser
third_party/sqlite/src/src/util.c
sqlite3Atoi64
int sqlite3Atoi64(const char *zNum, i64 *pNum, int length, u8 enc){ int incr; u64 u = 0; int neg = 0; int i; int c = 0; int nonNum = 0; int rc; const char *zStart; const char *zEnd = zNum + length; assert( enc==SQLITE_UTF8 || enc==SQLITE_UTF16LE || enc==SQLITE_UTF16BE ); if( enc==SQLITE_UTF8 ){ incr = 1; }else{ incr = 2; assert( SQLITE_UTF16LE==2 && SQLITE_UTF16BE==3 ); for(i=3-enc; i<length && zNum[i]==0; i+=2){} nonNum = i<length; zEnd = &zNum[i^1]; zNum += (enc&1); } while( zNum<zEnd && sqlite3Isspace(*zNum) ) zNum+=incr; if( zNum<zEnd ){ if( *zNum=='-' ){ neg = 1; zNum+=incr; }else if( *zNum=='+' ){ zNum+=incr; } } zStart = zNum; while( zNum<zEnd && zNum[0]=='0' ){ zNum+=incr; } for(i=0; &zNum[i]<zEnd && (c=zNum[i])>='0' && c<='9'; i+=incr){ u = u*10 + c - '0'; } testcase( i==18*incr ); testcase( i==19*incr ); testcase( i==20*incr ); if( u>LARGEST_INT64 ){ *pNum = neg ? SMALLEST_INT64 : LARGEST_INT64; }else if( neg ){ *pNum = -(i64)u; }else{ *pNum = (i64)u; } rc = 0; if( i==0 && zStart==zNum ){ rc = -1; }else if( nonNum ){ rc = 1; }else if( &zNum[i]<zEnd ){ int jj = i; do{ if( !sqlite3Isspace(zNum[jj]) ){ rc = 1; break; } jj += incr; }while( &zNum[jj]<zEnd ); } if( i<19*incr ){ assert( u<=LARGEST_INT64 ); return rc; }else{ c = i>19*incr ? 1 : compare2pow63(zNum, incr); if( c<0 ){ assert( u<=LARGEST_INT64 ); return rc; }else{ *pNum = neg ? SMALLEST_INT64 : LARGEST_INT64; if( c>0 ){ return 2; }else{ assert( u-1==LARGEST_INT64 ); return neg ? rc : 3; } } } }
void sqlite3Coverage(int x); int sqlite3FaultSim(int iTest); int sqlite3IsNaN(double x); int sqlite3Strlen30(const char *z); char *sqlite3ColumnType(Column *pCol, char *zDflt); static SQLITE_NOINLINE void sqlite3ErrorFinish(sqlite3 *db, int err_code); void sqlite3Error(sqlite3 *db, int err_code); void sqlite3SystemError(sqlite3 *db, int rc); void sqlite3ErrorWithMsg(sqlite3 *db, int err_code, const char *zFormat, ...); void sqlite3ErrorMsg(Parse *pParse, const char *zFormat, ...); int sqlite3ErrorToParser(sqlite3 *db, int errCode); void sqlite3Dequote(char *z); void sqlite3DequoteExpr(Expr *p); void sqlite3TokenInit(Token *p, char *z); int sqlite3_stricmp(const char *zLeft, const char *zRight); int sqlite3StrICmp(const char *zLeft, const char *zRight); int sqlite3_strnicmp(const char *zLeft, const char *zRight, int N); u8 sqlite3StrIHash(const char *z); static LONGDOUBLE_TYPE sqlite3Pow10(int E); int sqlite3AtoF(const char *z, double *pResult, int length, u8 enc); static int compare2pow63(const char *zNum, int incr); int sqlite3DecOrHexToI64(const char *z, i64 *pOut); int sqlite3GetInt32(const char *zNum, int *pValue); int sqlite3Atoi(const char *z); static int SQLITE_NOINLINE putVarint64(unsigned char *p, u64 v); int sqlite3PutVarint(unsigned char *p, u64 v); u8 sqlite3GetVarint(const unsigned char *p, u64 *v); u8 sqlite3GetVarint32(const unsigned char *p, u32 *v); int sqlite3VarintLen(u64 v); u32 sqlite3Get4byte(const u8 *p); void sqlite3Put4byte(unsigned char *p, u32 v); u8 sqlite3HexToInt(int h); void *sqlite3HexToBlob(sqlite3 *db, const char *z, int n); static void logBadConnection(const char *zType); int sqlite3SafetyCheckOk(sqlite3 *db); int sqlite3SafetyCheckSickOrOk(sqlite3 *db); int sqlite3AddInt64(i64 *pA, i64 iB); int sqlite3SubInt64(i64 *pA, i64 iB); int sqlite3MulInt64(i64 *pA, i64 iB); int sqlite3AbsInt32(int x); void sqlite3FileSuffix3(const char *zBaseFilename, char *z); LogEst sqlite3LogEstAdd(LogEst a, LogEst b); LogEst sqlite3LogEst(u64 x); LogEst sqlite3LogEstFromDouble(double x); u64 sqlite3LogEstToInt(LogEst x); const char *sqlite3VListNumToName(VList *pIn, int iVal); int sqlite3VListNameToNum(VList *pIn, const char *zName, int nName);
0b2699ec114a37986d7e1b1c4dc866185f9e01605f83dd6328ed458d26675798
1,865
whoi-acomms
linux
drivers/mmc/host/omap_hsmmc.c
omap_hsmmc_probe
static int __devinit omap_hsmmc_probe(struct platform_device *pdev) { struct omap_mmc_platform_data *pdata = pdev->dev.platform_data; struct mmc_host *mmc; struct omap_hsmmc_host *host = NULL; struct resource *res; int ret, irq; const struct of_device_id *match; match = of_match_device(of_match_ptr(omap_mmc_of_match), &pdev->dev); if (match) { pdata = of_get_hsmmc_pdata(&pdev->dev); if (match->data) { u16 *offsetp = match->data; pdata->reg_offset = *offsetp; } } if (pdata == NULL) { dev_err(&pdev->dev, "Platform Data is missing\n"); return -ENXIO; } if (pdata->nr_slots == 0) { dev_err(&pdev->dev, "No Slots\n"); return -ENXIO; } res = platform_get_resource(pdev, IORESOURCE_MEM, 0); irq = platform_get_irq(pdev, 0); if (res == NULL || irq < 0) return -ENXIO; res = request_mem_region(res->start, resource_size(res), pdev->name); if (res == NULL) return -EBUSY; ret = omap_hsmmc_gpio_init(pdata); if (ret) goto err; mmc = mmc_alloc_host(sizeof(struct omap_hsmmc_host), &pdev->dev); if (!mmc) { ret = -ENOMEM; goto err_alloc; } host = mmc_priv(mmc); host->mmc = mmc; host->pdata = pdata; host->dev = &pdev->dev; host->use_dma = 1; host->dev->dma_mask = &pdata->dma_mask; host->dma_ch = -1; host->irq = irq; host->slot_id = 0; host->mapbase = res->start + pdata->reg_offset; host->base = ioremap(host->mapbase, SZ_4K); host->power_mode = MMC_POWER_OFF; host->next_data.cookie = 1; platform_set_drvdata(pdev, host); mmc->ops = &omap_hsmmc_ops; if (mmc_slot(host).vcc_aux_disable_is_sleep) mmc_slot(host).no_off = 1; mmc->f_min = OMAP_MMC_MIN_CLOCK; if (pdata->max_freq > 0) mmc->f_max = pdata->max_freq; else mmc->f_max = OMAP_MMC_MAX_CLOCK; sema_init(&host->sem, 1); spin_lock_init(&host->irq_lock); host->fclk = clk_get(&pdev->dev, "fck"); if (IS_ERR(host->fclk)) { ret = PTR_ERR(host->fclk); host->fclk = NULL; goto err1; } if (host->pdata->controller_flags & OMAP_HSMMC_BROKEN_MULTIBLOCK_READ) { dev_info(&pdev->dev, "multiblock reads disabled due to 35xx erratum 2.1.1.128; MMC read performance may suffer\n"); mmc->caps2 |= MMC_CAP2_NO_MULTI_READ; } pm_runtime_enable(host->dev); pm_runtime_get_sync(host->dev); pm_runtime_set_autosuspend_delay(host->dev, MMC_AUTOSUSPEND_DELAY); pm_runtime_use_autosuspend(host->dev); omap_hsmmc_context_save(host); host->dbclk = clk_get(&pdev->dev, "mmchsdb_fck"); if (IS_ERR(host->dbclk)) { dev_warn(mmc_dev(host->mmc), "Failed to get debounce clk\n"); host->dbclk = NULL; } else if (clk_enable(host->dbclk) != 0) { dev_warn(mmc_dev(host->mmc), "Failed to enable debounce clk\n"); clk_put(host->dbclk); host->dbclk = NULL; } mmc->max_segs = 1024; mmc->max_blk_size = 512; mmc->max_blk_count = 0xFFFF; mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count; mmc->max_seg_size = mmc->max_req_size; mmc->caps |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED | MMC_CAP_WAIT_WHILE_BUSY | MMC_CAP_ERASE | MMC_CAP_SDIO_IRQ; mmc->caps |= mmc_slot(host).caps; if (mmc->caps & MMC_CAP_8_BIT_DATA) mmc->caps |= MMC_CAP_4_BIT_DATA; if (mmc_slot(host).nonremovable) mmc->caps |= MMC_CAP_NONREMOVABLE; mmc->pm_caps = mmc_slot(host).pm_caps; omap_hsmmc_conf_bus_power(host); res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx"); if (!res) { dev_err(mmc_dev(host->mmc), "cannot get DMA TX channel\n"); goto err_irq; } host->dma_line_tx = res->start; res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx"); if (!res) { dev_err(mmc_dev(host->mmc), "cannot get DMA RX channel\n"); goto err_irq; } host->dma_line_rx = res->start; ret = request_irq(host->irq, omap_hsmmc_irq, 0, mmc_hostname(mmc), host); if (ret) { dev_dbg(mmc_dev(host->mmc), "Unable to grab HSMMC IRQ\n"); goto err_irq; } if (pdata->init != NULL) { if (pdata->init(&pdev->dev) != 0) { dev_dbg(mmc_dev(host->mmc), "Unable to configure MMC IRQs\n"); goto err_irq_cd_init; } } if (omap_hsmmc_have_reg() && !mmc_slot(host).set_power) { ret = omap_hsmmc_reg_get(host); if (ret) goto err_reg; host->use_reg = 1; } mmc->ocr_avail = mmc_slot(host).ocr_mask; if ((mmc_slot(host).card_detect_irq)) { ret = request_threaded_irq(mmc_slot(host).card_detect_irq, NULL, omap_hsmmc_detect, IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_ONESHOT, mmc_hostname(mmc), host); if (ret) { dev_dbg(mmc_dev(host->mmc), "Unable to grab MMC CD IRQ\n"); goto err_irq_cd; } pdata->suspend = omap_hsmmc_suspend_cdirq; pdata->resume = omap_hsmmc_resume_cdirq; } OMAP_HSMMC_WRITE(host->base, ISE, INT_EN_MASK | CIRQ); OMAP_HSMMC_WRITE(host->base, IE, INT_EN_MASK); omap_hsmmc_protect_card(host); mmc_add_host(mmc); if (mmc_slot(host).name != NULL) { ret = device_create_file(&mmc->class_dev, &dev_attr_slot_name); if (ret < 0) goto err_slot_name; } if (mmc_slot(host).card_detect_irq && mmc_slot(host).get_cover_state) { ret = device_create_file(&mmc->class_dev, &dev_attr_cover_switch); if (ret < 0) goto err_slot_name; } omap_hsmmc_debugfs(mmc); pm_runtime_mark_last_busy(host->dev); pm_runtime_put_autosuspend(host->dev); return 0; err_slot_name: mmc_remove_host(mmc); free_irq(mmc_slot(host).card_detect_irq, host); err_irq_cd: if (host->use_reg) omap_hsmmc_reg_put(host); err_reg: if (host->pdata->cleanup) host->pdata->cleanup(&pdev->dev); err_irq_cd_init: free_irq(host->irq, host); err_irq: pm_runtime_put_sync(host->dev); pm_runtime_disable(host->dev); clk_put(host->fclk); if (host->dbclk) { clk_disable(host->dbclk); clk_put(host->dbclk); } err1: iounmap(host->base); platform_set_drvdata(pdev, NULL); mmc_free_host(mmc); err_alloc: omap_hsmmc_gpio_free(pdata); err: res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (res) release_mem_region(res->start, resource_size(res)); return ret; }
static int omap_hsmmc_card_detect(struct device *dev, int slot); static int omap_hsmmc_get_wp(struct device *dev, int slot); static int omap_hsmmc_get_cover_state(struct device *dev, int slot); static int omap_hsmmc_suspend_cdirq(struct device *dev, int slot); static int omap_hsmmc_resume_cdirq(struct device *dev, int slot); static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host); static void omap_hsmmc_reg_put(struct omap_hsmmc_host *host); static inline int omap_hsmmc_have_reg(void); static inline int omap_hsmmc_reg_get(struct omap_hsmmc_host *host); static inline void omap_hsmmc_reg_put(struct omap_hsmmc_host *host); static inline int omap_hsmmc_have_reg(void); static int omap_hsmmc_gpio_init(struct omap_mmc_platform_data *pdata); static void omap_hsmmc_gpio_free(struct omap_mmc_platform_data *pdata); static void omap_hsmmc_start_clock(struct omap_hsmmc_host *host); static void omap_hsmmc_stop_clock(struct omap_hsmmc_host *host); static u16 calc_divisor(struct omap_hsmmc_host *host, struct mmc_ios *ios); static void omap_hsmmc_set_clock(struct omap_hsmmc_host *host); static void omap_hsmmc_set_bus_width(struct omap_hsmmc_host *host); static void omap_hsmmc_set_bus_mode(struct omap_hsmmc_host *host); static int omap_hsmmc_context_restore(struct omap_hsmmc_host *host); static void omap_hsmmc_context_save(struct omap_hsmmc_host *host); static int omap_hsmmc_context_restore(struct omap_hsmmc_host *host); static void omap_hsmmc_context_save(struct omap_hsmmc_host *host); static void send_init_stream(struct omap_hsmmc_host *host); static void omap_hsmmc_dma_cleanup(struct omap_hsmmc_host *host, int errno); static void omap_hsmmc_dbg_report_irq(struct omap_hsmmc_host *host, u32 status); static irqreturn_t omap_hsmmc_irq(int irq, void *dev_id); static void set_sd_bus_power(struct omap_hsmmc_host *host); static int omap_hsmmc_switch_opcond(struct omap_hsmmc_host *host, int vdd); static void omap_hsmmc_protect_card(struct omap_hsmmc_host *host); static irqreturn_t omap_hsmmc_detect(int irq, void *dev_id); static void omap_hsmmc_dma_cb(int lch, u16 ch_status, void *data); static void omap_hsmmc_request(struct mmc_host *mmc, struct mmc_request *req); static void omap_hsmmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios); static int omap_hsmmc_get_cd(struct mmc_host *mmc); static int omap_hsmmc_get_ro(struct mmc_host *mmc); static void omap_hsmmc_init_card(struct mmc_host *mmc, struct mmc_card *card); static void omap_hsmmc_enable_sdio_irq(struct mmc_host *mmc, int enable); static void omap_hsmmc_conf_bus_power(struct omap_hsmmc_host *host); static int omap_hsmmc_enable_fclk(struct mmc_host *mmc); static int omap_hsmmc_disable_fclk(struct mmc_host *mmc); static int omap_hsmmc_regs_show(struct seq_file *s, void *data); static int omap_hsmmc_regs_open(struct inode *inode, struct file *file); static void omap_hsmmc_debugfs(struct mmc_host *mmc); static void omap_hsmmc_debugfs(struct mmc_host *mmc); static struct omap_mmc_platform_data *of_get_hsmmc_pdata(struct device *dev); static int __devexit omap_hsmmc_remove(struct platform_device *pdev); static int omap_hsmmc_suspend(struct device *dev); static int omap_hsmmc_resume(struct device *dev); static int omap_hsmmc_runtime_suspend(struct device *dev); static int omap_hsmmc_runtime_resume(struct device *dev);
267d021ecff01c4a271f4021ad5c90623acff0164652530fdfbdb18909137c97
5,971
Chilledheart
seafile
common/merge-new.c
int merge_directories
static int merge_directories (const char *store_id, int version, int n, SeafDirent *dents[], const char *basedir, GList **dents_out, MergeOptions *opt) { SeafDir *dir; SeafDir *sub_dirs[3]; char *dirname = NULL; char *new_basedir; int ret = 0; int dir_mask = 0, i; SeafDirent *merged_dent; for (i = 0; i < n; ++i) { if (dents[i] && S_ISDIR(dents[i]->mode)) dir_mask |= 1 << i; } seaf_debug ("dir_mask = %d\n", dir_mask); if (n == 3 && opt->do_merge) { switch (dir_mask) { case 0: g_return_val_if_reached (-1); case 1: seaf_debug ("%s%s: no dir, no need to merge\n", basedir, dents[0]->name); return 0; case 2: seaf_debug ("%s%s: only head is dir\n", basedir, dents[1]->name); *dents_out = g_list_prepend (*dents_out, seaf_dirent_dup(dents[1])); return 0; case 3: if (strcmp (dents[0]->id, dents[1]->id) == 0) { seaf_debug ("%s%s: dir deleted in remote\n", basedir, dents[0]->name); return 0; } seaf_debug ("%s%s: dir changed in head but deleted in remote\n", basedir, dents[1]->name); break; case 4: seaf_debug ("%s%s: only remote is dir\n", basedir, dents[2]->name); *dents_out = g_list_prepend (*dents_out, seaf_dirent_dup(dents[2])); return 0; case 5: if (strcmp (dents[0]->id, dents[2]->id) == 0) { seaf_debug ("%s%s: dir deleted in head\n", basedir, dents[0]->name); return 0; } seaf_debug ("%s%s: dir changed in remote but deleted in head\n", basedir, dents[2]->name); break; case 6: case 7: if (strcmp (dents[1]->id, dents[2]->id) == 0) { seaf_debug ("%s%s: dir is the same in head and remote\n", basedir, dents[1]->name); *dents_out = g_list_prepend (*dents_out, seaf_dirent_dup(dents[1])); return 0; } else if (dents[0] && strcmp(dents[0]->id, dents[1]->id) == 0) { seaf_debug ("%s%s: dir changed in remote but unchanged in head\n", basedir, dents[1]->name); *dents_out = g_list_prepend (*dents_out, seaf_dirent_dup(dents[2])); return 0; } else if (dents[0] && strcmp(dents[0]->id, dents[2]->id) == 0) { seaf_debug ("%s%s: dir changed in head but unchanged in remote\n", basedir, dents[1]->name); *dents_out = g_list_prepend (*dents_out, seaf_dirent_dup(dents[1])); return 0; } seaf_debug ("%s%s: dir is changed in both head and remote, " "merge recursively\n", basedir, dents[1]->name); break; default: g_return_val_if_reached (-1); } } memset (sub_dirs, 0, sizeof(sub_dirs[0])*n); for (i = 0; i < n; ++i) { if (dents[i] != NULL && S_ISDIR(dents[i]->mode)) { dir = seaf_fs_manager_get_seafdir (seaf->fs_mgr, store_id, version, dents[i]->id); if (!dir) { seaf_warning ("Failed to find dir %s.\n", dents[i]->id); ret = -1; goto free_sub_dirs; } opt->visit_dirs++; sub_dirs[i] = dir; dirname = dents[i]->name; } } new_basedir = g_strconcat (basedir, dirname, "/", NULL); ret = merge_trees_recursive (store_id, version, n, sub_dirs, new_basedir, opt); g_free (new_basedir); if (n == 3 && opt->do_merge) { if (dir_mask == 3 || dir_mask == 6 || dir_mask == 7) { merged_dent = seaf_dirent_dup (dents[1]); memcpy (merged_dent->id, opt->merged_tree_root, 40); *dents_out = g_list_prepend (*dents_out, merged_dent); } else if (dir_mask == 5) { merged_dent = seaf_dirent_dup (dents[2]); memcpy (merged_dent->id, opt->merged_tree_root, 40); *dents_out = g_list_prepend (*dents_out, merged_dent); } } free_sub_dirs: for (i = 0; i < n; ++i) seaf_dir_free (sub_dirs[i]); return ret; }
727f4188bf9c382b9e7412b8802296b9e4fbbb92e2160cbc84330e08c8262f7d
4,646
stevelord
PR30
linux-2.6.31/ti/WiLink62_AP/stad/src/Sta_Management/trafficAdmControl.c
trafficAdmCtrl_parseTspecIE
void trafficAdmCtrl_parseTspecIE(tspecInfo_t *pTSpecInfo, TI_UINT8 *pData) { tsInfo_t tsInfo; TI_UINT8 userPriority; TI_UINT8 acID; TI_UINT8 tid; TI_UINT8 direction; TI_UINT8 APSDbit; pData += 8; tsInfo.tsInfoArr[0] = *pData; tsInfo.tsInfoArr[1] = *(pData + 1); tsInfo.tsInfoArr[2] = *(pData + 2); pData += 3; userPriority = (((tsInfo.tsInfoArr[1]) & TS_INFO_1_USER_PRIORITY_MASK) >> USER_PRIORITY_SHIFT); acID = WMEQosTagToACTable[userPriority]; tid = (((tsInfo.tsInfoArr[0]) & TS_INFO_0_TSID_MASK) >> TSID_SHIFT); APSDbit = (((tsInfo.tsInfoArr[1]) & TS_INFO_1_APSD_MASK) >> APSD_SHIFT); direction = (((tsInfo.tsInfoArr[0]) & TS_INFO_0_DIRECTION_MASK) >> DIRECTION_SHIFT); pTSpecInfo->AC = (EAcTrfcType)acID; pTSpecInfo->userPriority = userPriority; pTSpecInfo->UPSDFlag = APSDbit; pTSpecInfo->streamDirection = (EStreamDirection)direction; pTSpecInfo->tid = tid; COPY_WLAN_WORD(&pTSpecInfo->nominalMsduSize, pData); COPY_WLAN_LONG(&pTSpecInfo->uMinimumServiceInterval, pData + 4); COPY_WLAN_LONG(&pTSpecInfo->uMaximumServiceInterval, pData + 8); COPY_WLAN_LONG(&pTSpecInfo->meanDataRate, pData + 28); COPY_WLAN_LONG(&pTSpecInfo->minimumPHYRate, pData + 44); COPY_WLAN_WORD(&pTSpecInfo->surplausBwAllowance, pData + 48); pTSpecInfo->surplausBwAllowance >>= SURPLUS_BANDWIDTH_ALLOW; COPY_WLAN_WORD(&pTSpecInfo->mediumTime, pData + 50); }
TI_HANDLE trafficAdmCtrl_create(TI_HANDLE hOs); TI_STATUS trafficAdmCtrl_unload(TI_HANDLE hTrafficAdmCtrl); TI_STATUS trafficAdmCtrl_smEvent(trafficAdmCtrl_t *pTrafficAdmCtrl, TI_UINT8 event, void *pData); TI_STATUS trafficAdmCtrl_smStart(fsmTSpecInfo_t *fsmTSpecInfo); TI_STATUS trafficAdmCtrl_smWaitStop(fsmTSpecInfo_t *fsmTSpecInfo); TI_STATUS trafficAdmCtrl_smWaitAccept(fsmTSpecInfo_t *fsmTSpecInfo); TI_STATUS trafficAdmCtrl_smWaitReject(fsmTSpecInfo_t *fsmTSpecInfo); TI_STATUS trafficAdmCtrl_smWaitTimeout(fsmTSpecInfo_t *fsmTSpecInfo); TI_STATUS trafficAdmCtrl_smActionUnexpected(fsmTSpecInfo_t *fsmTSpecInfo); TI_STATUS trafficAdmCtrl_smActionUnexpectedTspecResponse(fsmTSpecInfo_t *fsmTSpecInfo); TI_STATUS trafficAdmCtrl_smActionNop(fsmTSpecInfo_t *fsmTSpecInfo); TI_STATUS trafficAdmCtrl_startAdmRequest(TI_HANDLE hTrafficAdmCtrl, tspecInfo_t *pTSpecInfo); TI_STATUS trafficAdmCtrl_stopAdmRequest(TI_HANDLE hTrafficAdmCtrl, TI_UINT8 acID); TI_STATUS trafficAdmCtrl_stop(TI_HANDLE hTrafficAdmCtrl); TI_STATUS trafficAdmCtrl_recv(TI_HANDLE hTrafficAdmCtrl, TI_UINT8* pData, TI_UINT8 action); TI_STATUS trafficAdmCtrl_sendDeltsFrame(TI_HANDLE hTrafficAdmCtrl, tspecInfo_t *pTSpecInfo, TI_UINT8 reasonCode); TI_STATUS trafficAdmCtrl_startTimer(trafficAdmCtrl_t* pTrafficAdmCtrl, TI_UINT8 acID); TI_STATUS trafficAdmCtrl_stopTimer(trafficAdmCtrl_t* pTrafficAdmCtrl, TI_UINT8 acID); void trafficAdmCtrl_timeoutAcBE (TI_HANDLE hTrafficAdmCtrl, TI_BOOL bTwdInitOccured); void trafficAdmCtrl_timeoutAcBK(TI_HANDLE hTrafficAdmCtrl, TI_BOOL bTwdInitOccured); void trafficAdmCtrl_timeoutAcVI(TI_HANDLE hTrafficAdmCtrl, TI_BOOL bTwdInitOccured); void trafficAdmCtrl_timeoutAcVO(TI_HANDLE hTrafficAdmCtrl, TI_BOOL bTwdInitOccured); static TI_STATUS trafficAdmCtrl_tokenToAc (TI_HANDLE hTrafficAdmCtrl, TI_UINT8 token, TI_UINT8 *acID); TI_STATUS trafficAdmCtrl_buildFrameHeader(trafficAdmCtrl_t *pTrafficAdmCtrl, TTxCtrlBlk *pPktCtrlBlk); TI_STATUS trafficAdmCtrl_sendAdmissionReq(TI_HANDLE hTrafficAdmCtrl, tspecInfo_t *pTSpecInfo); void trafficAdmCtrl_print(trafficAdmCtrl_t *pTrafficAdmCtr);
5b1a946290b576b72e4c19f6f095f09aef32da057fdff9ab3cb283d7b3c42452
1,406
FelixPe
nodemcu-firmware
app/mbedtls/app/lwIPSocket.c
lwip_close
int lwip_close(int s) { lwIP_sock *sock = NULL; int err = 0; sock = get_socket(s); if (!sock) { return -1; } if (sock->conn->tcp->state != LISTEN) { if (sock->conn->state != NETCONN_STATE_ERROR){ tcp_recv(sock->conn->tcp, NULL); err = tcp_close(sock->conn->tcp); if (err != ERR_OK) { tcp_recv(sock->conn->tcp, recv_tcp); return -1; } } remove_tcp(sock->conn); } else { tcp_close(sock->conn->tcp); } free_netconn(sock->conn); free_socket(sock); return ERR_OK; }
static int find_socket(lwIP_netconn *newconn); static void remove_tcp(lwIP_netconn *conn); static void free_netconn(lwIP_netconn *netconn); static err_t netconn_getaddr(lwIP_netconn *conn, ip_addr_t *addr, u16_t *port, u8_t local); static void free_socket(lwIP_sock *sock); static err_t recv_tcp(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err); static err_t poll_tcp(void *arg, struct tcp_pcb *pcb); static err_t sent_tcp(void *arg, struct tcp_pcb *pcb, u16_t len); static void err_tcp(void *arg, err_t err); static err_t do_connected(void *arg, struct tcp_pcb *pcb, err_t err); static void setup_tcp(lwIP_netconn *conn); sint8 netconn_delete(lwIP_netconn *conn); sint8 netconn_bind(lwIP_netconn *conn, ip_addr_t *addr, u16_t port); sint8 netconn_connect(lwIP_netconn *conn, ip_addr_t *addr, u16_t port); static int alloc_socket(lwIP_netconn *newconn, int accepted); static lwIP_sock *get_socket(int s); int lwip_socket(int domain, int type, int protocol); int lwip_bind(int s, const struct sockaddr *name, socklen_t namelen); int lwip_connect(int s, const struct sockaddr *name, socklen_t namelen); int lwip_fcntl(int s, int cmd, int val); uint32_t lwip_getul(char *str); int lwip_recvfrom(int s, void *mem, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen); int lwip_read(int s, void *mem, size_t len); int lwip_recv(int s, void *mem, size_t len, int flags); int lwip_send(int s, const void *data, size_t size, int flags); int lwip_write(int s, const void *data, size_t size); int lwip_getpeername(int s, struct sockaddr *name, socklen_t *namelen);
5ac0df18f1a6eb09ea1e75d29b770e7cb4f6cb00432ca0dde98b2c3934855a25
682
AOKP
kernel_samsung_manta
drivers/mmc/host/dw_mmc.c
dw_mci_set_ios
static void dw_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) { struct dw_mci_slot *slot = mmc_priv(mmc); struct dw_mci_board *brd = slot->host->pdata; u32 regs, width = 1; slot->ctype = SDMMC_CTYPE_1BIT; switch (ios->bus_width) { case MMC_BUS_WIDTH_1: slot->ctype = SDMMC_CTYPE_1BIT; width = 1; break; case MMC_BUS_WIDTH_4: slot->ctype = SDMMC_CTYPE_4BIT; width = 4; break; case MMC_BUS_WIDTH_8: slot->ctype = SDMMC_CTYPE_8BIT; width = 8; break; } regs = mci_readl(slot->host, UHS_REG); if (ios->timing == MMC_TIMING_UHS_DDR50) regs |= (0x1 << slot->id) << 16; else regs &= ~(0x1 << slot->id) << 16; if (slot->host->pdata->caps & (MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25 | MMC_CAP_UHS_SDR50 | MMC_CAP_UHS_SDR104 | MMC_CAP_UHS_DDR50)) regs |= (0x1 << slot->id); if (slot->host->pdata->set_io_timing) slot->host->pdata->set_io_timing(slot->host, ios->timing); mci_writel(slot->host, UHS_REG, regs); if (ios->clock) { slot->clock = ios->clock; } switch (ios->power_mode) { case MMC_POWER_UP: set_bit(DW_MMC_CARD_NEED_INIT, &slot->flags); break; case MMC_POWER_ON: if (mmc->caps & MMC_CAP_HW_RESET && mmc->card && slot->host->quirks & DW_MMC_QUIRK_HW_RESET_PW) mmc->card->ext_csd.rst_n_function |= EXT_CSD_RST_N_ENABLED; break; default: break; } if (brd->cfg_gpio) brd->cfg_gpio(width); }
static int dw_mci_req_show(struct seq_file *s, void *v); static int dw_mci_req_open(struct inode *inode, struct file *file); static int dw_mci_regs_show(struct seq_file *s, void *v); static int dw_mci_regs_open(struct inode *inode, struct file *file); static void dw_mci_init_debugfs(struct dw_mci_slot *slot); static void dw_mci_set_timeout(struct dw_mci *host); static u32 dw_mci_prepare_command(struct mmc_host *mmc, struct mmc_command *cmd); static u32 dw_mci_prep_stop(struct dw_mci *host, struct mmc_command *cmd); static void send_stop_cmd(struct dw_mci *host, struct mmc_data *data); static void dw_mci_stop_dma(struct dw_mci *host); static void mci_send_cmd(struct dw_mci_slot *slot, u32 cmd, u32 arg); static bool dw_mci_wait_fifo_reset(struct device *dev, struct dw_mci *host); static int dw_mci_get_dma_dir(struct mmc_data *data); static void dw_mci_dma_cleanup(struct dw_mci *host); static void dw_mci_idmac_stop_dma(struct dw_mci *host); static void dw_mci_idma_reset_dma(struct dw_mci *host); static void dw_mci_idmac_complete_dma(struct dw_mci *host); static void dw_mci_idmac_start_dma(struct dw_mci *host, unsigned int sg_len); static int dw_mci_idmac_init(struct dw_mci *host); static int dw_mci_submit_data_dma(struct dw_mci *host, struct mmc_data *data); static void dw_mci_submit_data(struct dw_mci *host, struct mmc_data *data); static void dw_mci_setup_bus(struct dw_mci_slot *slot, int force); static void dw_mci_request(struct mmc_host *mmc, struct mmc_request *mrq); static int dw_mci_get_ro(struct mmc_host *mmc); static int dw_mci_get_cd(struct mmc_host *mmc); static void dw_mci_enable_sdio_irq(struct mmc_host *mmc, int enb); static u8 dw_mci_tuning_sampling(struct dw_mci *host); static void dw_mci_set_sampling(struct dw_mci *host, u8 sample); static u8 dw_mci_get_sampling(struct dw_mci *host); static s8 get_median_sample(u8 map); static int dw_mci_execute_tuning(struct mmc_host *mmc, u32 opcode); static void dw_mci_hw_reset(struct mmc_host *host); static void dw_mci_command_complete(struct dw_mci *host, struct mmc_command *cmd); static void dw_mci_tasklet_func(unsigned long priv); static void dw_mci_set_part_bytes(struct dw_mci *host, void *buf, int cnt); static int dw_mci_push_part_bytes(struct dw_mci *host, void *buf, int cnt); static int dw_mci_pull_part_bytes(struct dw_mci *host, void *buf, int cnt); static void dw_mci_pull_final_bytes(struct dw_mci *host, void *buf, int cnt); static void dw_mci_push_data16(struct dw_mci *host, void *buf, int cnt); static void dw_mci_pull_data16(struct dw_mci *host, void *buf, int cnt); static void dw_mci_push_data32(struct dw_mci *host, void *buf, int cnt); static void dw_mci_pull_data32(struct dw_mci *host, void *buf, int cnt); static void dw_mci_push_data64(struct dw_mci *host, void *buf, int cnt); static void dw_mci_pull_data64(struct dw_mci *host, void *buf, int cnt); static void dw_mci_pull_data(struct dw_mci *host, void *buf, int cnt); static void dw_mci_read_data_pio(struct dw_mci *host); static void dw_mci_write_data_pio(struct dw_mci *host); static void dw_mci_cmd_interrupt(struct dw_mci *host, u32 status); static irqreturn_t dw_mci_interrupt(int irq, void *dev_id); static void dw_mci_work_routine_card(struct work_struct *work); static void dw_mci_notify_change(struct platform_device *dev, int state); static irqreturn_t dw_mci_detect_interrupt(int irq, void *dev_id); static int __devinit dw_mci_init_slot(struct dw_mci *host, unsigned int id); static void dw_mci_cleanup_slot(struct dw_mci_slot *slot, unsigned int id); static void dw_mci_init_dma(struct dw_mci *host); static bool mci_wait_reset(struct device *dev, struct dw_mci *host); static void dw_mci_timeout_timer(unsigned long data); int __devinit dw_mci_probe(struct dw_mci *host); void dw_mci_remove(struct dw_mci *host); int dw_mci_suspend(struct dw_mci *host); int dw_mci_resume(struct dw_mci *host); static int __init dw_mci_init(void); static void __exit dw_mci_exit(void);
01e95199d2d5781b6a8af87c14ce5d2913c47ef6002be082a636d2e2641da60d
1,399
GaloisInc
hacrypto
src/C/libressl/libressl-2.1.6/crypto/des/set_key.c
int DES_is_weak_key
int DES_is_weak_key(const_DES_cblock *key) { unsigned int i; for (i = 0; i < NUM_WEAK_KEY; i++) if (memcmp(weak_keys[i], key, sizeof(DES_cblock)) == 0) return 1; return 0; }
void DES_set_odd_parity(DES_cblock *key); int DES_check_key_parity(const_DES_cblock *key); int DES_set_key(const_DES_cblock *key, DES_key_schedule *schedule); int DES_set_key_checked(const_DES_cblock *key, DES_key_schedule *schedule); void DES_set_key_unchecked(const_DES_cblock *key, DES_key_schedule *schedule); int DES_key_sched(const_DES_cblock *key, DES_key_schedule *schedule);
4c7f7c6cdecc432bbb333eca62f9e3000dc7f7b700b77f381033004f7ccad861
183
naens
tofolder
tofolder_cli.c
main
int main(int argc, char **argv) { if (argc == 1) { printf("args: files and folders to move to a separate folder\n"); return 1; } char *dir = dirname(argv[1]); int dirlen = strlen(dir); struct stat st; for (int i = 1; i < argc; i++) if (stat(argv[i], &st) != 0) { printf("file \"%s\" doesn't exist\n", argv[i]); return 1; } char lcs[0x1000]; get_utf8_lcs(argc - 1, &argv[1], lcs); int nsubfns; int nsrc = 0; int ndest = 0; get_nsubfns(dir, &nsubfns); printf("nsubfns=%d\n", nsubfns); char *src_fns[nsubfns]; char *dest_dirs[nsubfns]; get_src_dest(dir, lcs, &nsrc, src_fns, &ndest, dest_dirs); initcurses(); int starty_src; int starty_dest; int height_src; int height_dest; initcursvals(nsrc, ndest, &starty_src, &starty_dest, &height_src, &height_dest); WINDOW *win_src; WINDOW *win_dest; WINDOW *win_form; FORM *form; FIELD *field[3]; int label_width = 10; int field_row = LINES - 1; int field_begin = label_width; int field_width = COLS - label_width; use_default_colors(); field[0] = new_field(1, label_width, field_row, 0, 0, 0); field_opts_off(field[0], O_ACTIVE); set_field_buffer(field[0], 0, " NEW: "); field[1] = new_field(1, field_width, field_row, field_begin, 0, 0); field_opts_off(field[1], O_AUTOSKIP); set_field_buffer(field[1], 0, lcs); field_opts_off(field[1], O_BLANK); field[2] = NULL; win_form = newwin(1, COLS, field_row, 0); keypad(win_form, TRUE); form = new_form(field); post_form(form); set_form_win(form, win_form); set_form_sub(form, win_form); mvprintw(5, 0, "height_dest=%d\n", height_dest); mvprintw(starty_src - 1, 0, "Files / directories to move"); printw(" starty_src=%d starty_dest=%d LINES=%d", starty_src, starty_dest, LINES); win_src = newwin(height_src, COLS, starty_src, 0); for (int i = 0; i < height_src; i++) mvwprintw(win_src, i, 0, " %s", src_fns[i]); mvprintw(starty_dest - 1, 0, "Destination"); win_dest = newwin(height_dest, COLS, starty_dest, 0); for (int i = 0; i < height_dest; i++) mvwprintw(win_dest, i, 0, " %s", dest_dirs[i]); int isrc = 0; int idest = 0; WINDOW *curr_win = win_src; int cksrc[nsrc]; for (int i = 0; i < nsrc; i++) cksrc[i] = (ndest == 0 && strcmp(src_fns[i], lcs) == 0) ? 0 : 1; int ckdest = 0; uncheck_src(dest_dirs[ckdest], cksrc, nsrc, src_fns); scrollok(win_src, TRUE); scrollok(win_dest, TRUE); scrollok(win_form, TRUE); redraw(curr_win, win_src, win_dest, win_form, isrc, idest, cksrc, ckdest, nsrc, ndest, form, field); int cq = 0; int ch = getch(); for (;;) { switch(ch) { case ctrl('q'): cq = !cq; break; case '\t': curr_win = (curr_win == win_src) ? win_dest : win_src; break; case ' ': if (curr_win == win_src) { char *field_string = get_field_string(form, field, field_width); if (!(idest == ndest && strcmp(src_fns[isrc], field_string) == 0)) cksrc[isrc] = !cksrc[isrc]; if (cksrc[isrc]) uncheck_dest(src_fns[isrc], &ckdest, ndest, dest_dirs); free(field_string); } else { ckdest = idest; uncheck_src(dest_dirs[idest], cksrc, nsrc, src_fns); } break; case ctrl('e'): case KEY_UP: if (curr_win == win_src && isrc >= 1) isrc--; if (curr_win == win_dest && idest >= 1) idest--; break; case ctrl('x'): case KEY_DOWN: if (curr_win == win_src && isrc < nsrc - 1) isrc++; if (curr_win == win_dest && idest < ndest) idest++; break; case 'r': if (!cq) goto default_case; case 30: cq = 0; if (curr_win == win_src) isrc = 0; if (curr_win == win_dest) idest = 0; break; case 'c': if (!cq) goto default_case; cq = 0; if (curr_win == win_src) isrc = nsrc - 1; if (curr_win == win_dest) idest = ndest; break; case KEY_ENTER: case '\r': case '\n': goto work; case ctrl('u'): case 'q': endcurses(form, field); goto end; default_case: default: break; } if (curr_win == win_dest && idest == ndest) { char *field_string = get_field_string(form, field, field_width); uncheck_src(field_string, cksrc, nsrc, src_fns); free(field_string); ckdest = ndest; } redraw(curr_win, win_src, win_dest, win_form, isrc, idest, cksrc, ckdest, nsrc, ndest, form, field); if (curr_win == win_dest && idest == ndest) ch = field_loop(win_form, form, field); else ch = getch(); } work: ; char *dest_string; if (idest == ndest) { char *field_string = get_field_string(form, field, field_width); dest_string = field_string; } else { dest_string = dest_dirs[idest]; } endcurses(form, field); printf("move files:\n"); for (int i = 0; i < nsrc; i++) if (cksrc[i]) printf(" %s/%s\n", dir, src_fns[i]); printf("to %s/\n", dest_string); printf("OK? (y/n) "); scanf(" %c",&ch); if (ch == 'y' || ch == 'Y') { printf("#### moving ####\n"); if (rec_mkdir(dest_string) != 0) goto end; int dest_len = strlen(dest_string); for (int i = 0; i < nsrc; i++) if (cksrc[i]) { int flen = strlen(src_fns[i]); char *from_path = malloc(dirlen + 1 + flen + 1); sprintf(from_path, "%s/%s", dir, src_fns[i]); char *to_path; if (dest_string[0] == '/') { to_path = malloc(dest_len + 1 + flen + 1); sprintf(to_path, "%s/%s", dest_string, src_fns[i]); } else { to_path = malloc(dirlen + 1 + dest_len + 1 + flen + 1); sprintf(to_path, "%s/%s/%s", dir, dest_string, src_fns[i]); } printf("moving %s to %s\n", from_path, to_path); free(from_path); free(to_path); } } else printf("do not move\n"); if (idest == ndest) free(dest_string); end: return 0; }
int field_loop(WINDOW *form_window, FORM *form, FIELD *field[]); void uncheck_dest(char *src_str, int *ckdest, int ndest, char **dest_dirs); void uncheck_src(char *dest_str, int *cksrc, int nsrc, char **src_fns); void get_utf8_lcs(int nfns, char **fns, char *lcs); void get_nsubfns(char *dir, int *nsubfns); void get_src_dest(char *dir, char *lcs, int *nsrc, char **src_fns, int *ndest, char **dest_dirs); void initcurses(); char *get_field_string(FORM *form, FIELD **field, int field_width); void endcurses(FORM *form, FIELD **field); int rec_mkdir(char *d_str);
387c2f9e07a3d568e0218c519c511eed94da705105b69b59600d4e1612afa027
6,406
MaxKot
Log4JDash
src/Log4JParserC/Log4JIterator.c
Log4JIteratorEventSourceMoveNext_
ool Log4JIteratorEventSourceMoveNext_ (void *context) { Log4JIteratorEventSourceBaseContext_ *contextD = (Log4JIteratorEventSourceBaseContext_ *) context; if (!contextD->Source) { return false; } Log4JEvent nextEvent; if (contextD->First == NULL) { nextEvent = Log4JEventSourceFirst (contextD->Source); contextD->First = nextEvent; } else if (contextD->Current) { nextEvent = Log4JEventSourceNext (contextD->Source, contextD->Current); } else { nextEvent = NULL; } contextD->Current = nextEvent; return nextEvent != NULL; }
tatic void AssertLog4JIteratorSanityImpl_ (const Log4JIterator *self); OG4JPARSERC_API void Log4JIteratorDestroy (Log4JIterator *self); OG4JPARSERC_API bool Log4JIteratorMoveNext (Log4JIterator *self); OG4JPARSERC_API const Log4JEvent Log4JIteratorCurrent (const Log4JIterator *self, size_t *id); oid Log4JIteratorInitEventSourceBase_ (Log4JIterator **self, const Log4JEventSource *source); oid Log4JIteratorEventSourceBaseDestroy_ (void *context); onst Log4JEvent Log4JIteratorEventSourceBaseCurrent_ (const void *context, size_t *id); OG4JPARSERC_API void Log4JIteratorInitEventSource (Log4JIterator **self, const Log4JEventSource *source); OG4JPARSERC_API void Log4JIteratorInitEventSourceReverse (Log4JIterator **self, const Log4JEventSource *source); ool Log4JIteratorEventSourceReverseMoveNext_ (void *context); OG4JPARSERC_API void Log4JIteratorInitFilter (Log4JIterator **self, Log4JIterator *inner, const Log4JFilter *filter); oid Log4JIteratorFilterDestroy_ (void *context); ool Log4JIteratorFilterMoveNext_ (void *context); onst Log4JEvent Log4JIteratorFilterCurrent_ (const void *context, size_t *id);
28da71cc30726a30327f647b01cbdc418ef50c2e3541593a9014ee6e752ec604
633
NanoBreeze
WebServio
WebServio/MessageFactory.c
create400Message
char* create400Message() { char* dateTime = getCurrentDateTime(); char* prefix = "HTTP/1.1 400 Bad Request\r\n" "Server: WebServio\r\n" "Date: "; char* suffix = "\r\n\r\n"; char* message = (char*) malloc(strlen(prefix) + strlen(dateTime) + strlen(suffix) + 1); if (!message) { return NULL; } strcpy(message, prefix); strcat(message, dateTime); strcat(message, suffix); return message; }
char* create200Message(char* file); char* create301Message(char* host, char* path); char* create404Message(char* file); char* create411Message(); char* create200MessageDir(char* dirPath); char* createMessageWithBodyFromFile(char* file, char* statusLine); char* createMessageWithSuppliedBody(char* bodyText, char* statusLine);
bf308d48f0e732e280c8784d4cc1787ce784546e4c6f7d12159cbd453c9f5492
444
BrianHoldsworth
netatalk2
ap/gpl/timemachine/netatalk-2.2.0/sys/solaris/tpi.c
void t_info_ack
void t_info_ack( queue_t *q, long state ) { mblk_t *m; struct T_info_ack *t; if (( m = allocb( sizeof( struct T_info_ack ), BPRI_HI )) == NULL ) { return; } m->b_wptr = m->b_rptr + sizeof( struct T_info_ack ); m->b_datap->db_type = M_PCPROTO; t = (struct T_info_ack *)m->b_rptr; t->PRIM_type = T_INFO_ACK; t->TSDU_size = 586; t->ETSDU_size = -2; t->CDATA_size = -2; t->DDATA_size = -2; t->ADDR_size = sizeof( struct sockaddr_at ); t->OPT_size = 64; t->TIDU_size = 1024; t->SERV_type = T_CLTS; t->CURRENT_state = state; t->PROVIDER_flag = 0; qreply( q, m ); return; }
static int tpi_getinfo( dev_info_t *dip, ddi_info_cmd_t cmd, void *arg, void **resultp ); static int tpi_identify( dev_info_t *dip ); static int tpi_attach( dev_info_t *dip, ddi_attach_cmd_t cmd ); static int tpi_detach( dev_info_t *dip, ddi_detach_cmd_t cmd ); static int tpi_open( queue_t *q, dev_t *dev, int oflag, int sflag, cred_t *cred ); static int tpi_close( queue_t *q, int oflag, cred_t *cred ); static int tpi_rput( queue_t *q, mblk_t *m ); void t_bind_ack( queue_t *q, struct sockaddr_at *sat ); void t_ok_ack( queue_t *q, long prim ); void t_error_ack( queue_t *q, long prim, long terror, long uerror ); void t_unitdata_ind( queue_t *q, mblk_t *m0, struct sockaddr_at *sat ); static int tpi_wput( queue_t *q, mblk_t *m );
b4119d85695111d51d95988340055d6848a38eab407c7f53b5a4688c0c9d259e
652
ZHAW-INES
rioxo-uClinux-dist
lib/mesa/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
U_FIXED
static GLuint U_FIXED(GLfloat value, GLuint frac_bits) { value *= (1<<frac_bits); return value < 0 ? 0 : value; }
static GLuint translate_wrap_mode( GLenum wrap ); static GLint S_FIXED(GLfloat value, GLuint frac_bits); static void upload_wm_samplers( struct brw_context *brw );
86ce24f7cef482ebfe2acb5fb7d1a28a122e27c3f7e1ebd055852024dc6a6794
120
TechTux
linux-2.6.46.6
sound/pci/ca0106/ca0106_mixer.c
snd_ca0106_capture_source_put
static int snd_ca0106_capture_source_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol); unsigned int val; int change = 0; u32 mask; u32 source; val = ucontrol->value.enumerated.item[0] ; if (val >= 6) return -EINVAL; change = (emu->capture_source != val); if (change) { emu->capture_source = val; source = (val << 28) | (val << 24) | (val << 20) | (val << 16); mask = snd_ca0106_ptr_read(emu, CAPTURE_SOURCE, 0) & 0xffff; snd_ca0106_ptr_write(emu, CAPTURE_SOURCE, 0, source | mask); } return change; }
static int __devinit remove_ctl(struct snd_card *card, const char *name); static struct snd_kcontrol __devinit *ctl_find(struct snd_card *card, const char *name); static int __devinit rename_ctl(struct snd_card *card, const char *src, const char *dst); int __devinit snd_ca0106_mixer(struct snd_ca0106 *emu);
ff9099c6989298990ebdf63a6d11cb338d0876a47ad9c38290f5fea1bd803361
613
Maroc-OS
Merruk-Technology
modules/drivers/char/brcm/fuse_ipc/ipc_crashsupport.c
DUMP_CP_assert_log
void DUMP_CP_assert_log(void) { UInt32 t0, t1, i, size, retryCount; UInt8 *p; UInt32 packetCount = 0; void __iomem *AssertLogVAddr = NULL; struct file* sdDumpFile = NULL; mm_segment_t oldfs; struct timespec ts; struct rtc_time tm; char assertFileName[CP_CRASH_DUMP_MAX_LEN]; extern void abort(void); oldfs = get_fs(); set_fs (KERNEL_DS); if( BCMLOG_CPCRASH_SDCARD == BCMLOG_GetCpCrashDumpDevice() ) { getnstimeofday(&ts); rtc_time_to_tm(ts.tv_sec, &tm); snprintf(assertFileName, CP_CRASH_DUMP_MAX_LEN, "%s%s%d_%02d_%02d_%02d_%02d_%02d%s", CP_CRASH_DUMP_DIR, CP_CRASH_DUMP_BASE_FILE_NAME, tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec, CP_CRASH_DUMP_FILE_EXT ); sdDumpFile = filp_open( assertFileName, O_WRONLY|O_TRUNC|O_LARGEFILE|O_CREAT, 666); if ( IS_ERR(sdDumpFile) ) { IPC_DEBUG(DBG_ERROR,"failed to open sdDumpFile %s\n", assertFileName); sdDumpFile = NULL; } else { IPC_DEBUG(DBG_ERROR,"sdDumpFile %s opened OK\n",assertFileName); } } BCMLOG_StartCpCrashDump( sdDumpFile ); retryCount = 0; t0 = TIMER_GetValue(); while (1) { t1 = TIMER_GetValue(); SmLocalControl.SmControl->CrashCode = IPC_AP_CLEAR_TO_SEND; while (SmLocalControl.SmControl->CrashCode == IPC_AP_CLEAR_TO_SEND) { for (i=0; i<256; i++); if (TIMER_GetValue() - t1 > TICKS_ONE_SECOND * 20) break; } if (SmLocalControl.SmControl->CrashCode == IPC_AP_CLEAR_TO_SEND) { if ( retryCount < MAX_CP_DUMP_RETRIES ) { retryCount++; IPC_DEBUG(DBG_ERROR,"timeout %d, trying again...\n", (int)retryCount); continue; } else { IPC_DEBUG(DBG_ERROR,"Abort --- max retries %d reached\n", (int)retryCount); break; } } retryCount = 0; AssertLogVAddr = ioremap_nocache((UInt32)(SmLocalControl.SmControl->CrashCode), ASSERT_BUF_SIZE); if(NULL == AssertLogVAddr) { IPC_DEBUG(DBG_ERROR, "ioremap_nocache failed in DUMP_CP_assert_log\n"); break; } p = (UInt8 *)AssertLogVAddr; size = (p[0] << 8) + p[1]; if (size == 0) { IPC_DEBUG(DBG_INFO, "assert log size 0, exiting, packetCount:0x%x\n", (int)packetCount); iounmap(AssertLogVAddr); AssertLogVAddr = NULL; break; } if (size > ASSERT_BUF_SIZE - 2) { IPC_DEBUG(DBG_ERROR, "Abort --- improper size [%08x]=%d\n", SmLocalControl.SmControl->CrashCode, (int)size); iounmap(AssertLogVAddr); AssertLogVAddr = NULL; break; } BCMLOG_HandleCpCrashDumpData( (const char*)(p+2), size ); packetCount++; iounmap(AssertLogVAddr); AssertLogVAddr = NULL; #if 0 if (TIMER_GetValue() - t0 > TICKS_ONE_SECOND * 10 * 60) { IPC_DEBUG(DBG_ERROR,"Abort --- CP assertion log too long\n"); break; } #endif } IPC_DEBUG(DBG_ERROR,"Starting CP RAM dump - do not power down...\n"); DUMP_CPMemoryByList( dumped_crash_summary_ptr->mem_dump ); IPC_DEBUG(DBG_ERROR,"CP RAM dump complete\n"); BCMLOG_EndCpCrashDump( ); if ( sdDumpFile ) { filp_close( sdDumpFile ,NULL ); } set_fs (oldfs); sys_sync(); IPC_DEBUG(DBG_ERROR,"CP crash dump complete\n"); if (BCMLOG_CPCRASH_MTD != BCMLOG_GetCpCrashDumpDevice()) abort(); #ifdef CONFIG_BRCM_KPANIC_UI_IND else lcdc_disp_img(IMG_INDEX_END_DUMP); #endif }
void GetStringFromPA(UInt32 inPhysAddr, char* inStrBuf, UInt32 inStrBufLen); void ProcessCPCrashedDump(struct work_struct *work); int IpcCPCrashCheck(void); void DUMP_CPMemoryByList(T_RAMDUMP_BLOCK* mem_dump);
2863adc72fc8dd3c1b55b0ffa48bccf95780da8b92d51b2ee6d50e60bed894bf
3,746
andyOsaft
02_SourceCode
freeRTOS/FreeRTOSV7.4.0/FreeRTOSV7.4.0/FreeRTOS/Demo/RX600_RX62N-RSK_Renesas/RTOSDemo/main-full.c
prvRegTest1Implementation
static void prvRegTest1Implementation( void ) { ; Put a known value in each register. MOV.L #1, R1 MOV.L #2, R2 MOV.L #3, R3 MOV.L #4, R4 MOV.L #5, R5 MOV.L #6, R6 MOV.L #7, R7 MOV.L #8, R8 MOV.L #9, R9 MOV.L #10, R10 MOV.L #11, R11 MOV.L #12, R12 MOV.L #13, R13 MOV.L #14, R14 MOV.L #15, R15 ; Loop, checking each itteration that each register still contains the ; expected value. TestLoop1: ; Push the registers that are going to get clobbered. PUSHM R14-R15 ; Increment the loop counter to show this task is still getting CPU time. MOV.L #_ulRegTest1CycleCount, R14 MOV.L [ R14 ], R15 ADD #1, R15 MOV.L R15, [ R14 ] ; Yield to extend the text coverage. Set the bit in the ITU SWINTR register. MOV.L #1, R14 MOV.L #0872E0H, R15 MOV.B R14, [R15] NOP NOP ; Restore the clobbered registers. POPM R14-R15 ; Now compare each register to ensure it still contains the value that was ; set before this loop was entered. CMP #1, R1 BNE RegTest1Error CMP #2, R2 BNE RegTest1Error CMP #3, R3 BNE RegTest1Error CMP #4, R4 BNE RegTest1Error CMP #5, R5 BNE RegTest1Error CMP #6, R6 BNE RegTest1Error CMP #7, R7 BNE RegTest1Error CMP #8, R8 BNE RegTest1Error CMP #9, R9 BNE RegTest1Error CMP #10, R10 BNE RegTest1Error CMP #11, R11 BNE RegTest1Error CMP #12, R12 BNE RegTest1Error CMP #13, R13 BNE RegTest1Error CMP #14, R14 BNE RegTest1Error CMP #15, R15 BNE RegTest1Error ; All comparisons passed, start a new itteratio of this loop. BRA TestLoop1 RegTest1Error: ; A compare failed, just loop here so the loop counter stops incrementing ; causing the check task to indicate the error. BRA RegTest1Error }
void main(void); static void prvCheckTask( void *pvParameters ); void vApplicationSetupTimerInterrupt( void ); void vApplicationMallocFailedHook( void ); void vApplicationStackOverflowHook( xTaskHandle pxTask, signed char *pcTaskName ); void vApplicationIdleHook( void ); static void prvRegTest1Task( void *pvParameters ); static void prvRegTest2Task( void *pvParameters ); static void prvRegTest2Implementation( void );
a11958da4a6b7c1e0555cc1107dc444e31651ef592c54a0fb6e647d3dc552193
1,706
BDI-pathogens
OpenABM-Covid19
src/params.c
set_model_param_manual_trace_on
int set_model_param_manual_trace_on( model* model, int value ) { model->params->manual_trace_on = value; return TRUE; }
void initialize_params( parameters *params ); void set_up_default_occupation_network_table( parameters *params ); int get_model_param_hospital_on(model *model); double get_model_param_fatality_fraction(model * model, int age_group); double get_model_param_daily_fraction_work_used(model *model, int idx); int get_model_param_quarantine_days(model *model); double get_model_param_self_quarantine_fraction(model *model); double get_model_param_test_on_symptoms_compliance(model *model); double get_model_param_test_on_traced_symptoms_compliance(model *model); double get_model_param_test_on_traced_positive_compliance(model *model); double get_model_param_quarantine_compliance_positive(model *model); int get_model_param_trace_on_symptoms(model *model); int get_model_param_trace_on_positive(model *model); int get_model_param_quarantine_on_traced(model *model); double get_model_param_traceable_interaction_fraction(model *model); int get_model_param_tracing_network_depth(model *model); int get_model_param_allow_clinical_diagnosis(model *model); int get_model_param_quarantine_household_on_symptoms(model *model); int get_model_param_quarantine_household_on_positive(model *model); int get_model_param_quarantine_household_on_traced_positive(model *model); int get_model_param_quarantine_household_on_traced_symptoms(model *model); int get_model_param_quarantine_household_contacts_on_positive(model *model); int get_model_param_quarantine_household_contacts_on_symptoms(model *model); int get_model_param_test_on_symptoms(model *model); int get_model_param_test_release_on_negative(model *model); int get_model_param_test_on_traced(model *model); int get_model_param_test_result_wait(model *model); int get_model_param_test_order_wait(model *model); int get_model_param_test_result_wait_priority(model *model); int get_model_param_test_order_wait_priority(model *model); int get_model_param_priority_test_contacts(model *model, int idx); double get_model_param_app_users_fraction(model *model); int get_model_param_app_turned_on(model *model); int get_model_param_lockdown_on(model *model); int get_model_param_lockdown_elderly_on(model *model); double get_model_param_lockdown_house_interaction_multiplier(model *model); double get_model_param_lockdown_random_network_multiplier(model *model); double get_model_param_lockdown_occupation_multiplier(model *model, int idx); int get_model_param_manual_trace_on_hospitalization( model* model ); int get_model_param_manual_trace_on_positive( model* model ); int get_model_param_manual_trace_on( model* model ); int get_model_param_manual_trace_delay( model* model ); int get_model_param_manual_trace_exclude_app_users( model* model ); int get_model_param_manual_trace_n_workers( model* model ); int get_model_param_manual_trace_interviews_per_worker_day( model* model ); int get_model_param_manual_trace_notifications_per_worker_day( model* model ); double get_model_param_manual_traceable_fraction( model* model, int type ); int set_model_param_quarantine_days(model *model, int value ); int set_model_param_self_quarantine_fraction(model *model, double value); int set_model_param_test_on_symptoms_compliance(model *model, double value); int set_model_param_test_on_traced_symptoms_compliance(model *model, double value); int set_model_param_test_on_traced_positive_compliance(model *model, double value); int set_model_param_quarantine_compliance_positive(model *model, double value); int set_model_param_quarantine_compliance_traced_positive(model *model, double value); int set_model_param_trace_on_symptoms(model *model, int value); int set_model_param_trace_on_positive(model *model, int value); int set_model_param_quarantine_on_traced( model *model, int value ); int set_model_param_traceable_interaction_fraction( model *model, double value ); int set_model_param_tracing_network_depth( model *model, int value ); int set_model_param_allow_clinical_diagnosis( model *model, int value ); int set_model_param_quarantine_household_on_symptoms( model *model, int value ); int set_model_param_quarantine_household_on_positive( model *model, int value ); int set_model_param_quarantine_household_on_traced_positive( model *model, int value ); int set_model_param_quarantine_household_on_traced_symptoms( model *model, int value ); int set_model_param_quarantine_household_contacts_on_positive( model *model, int value ); int set_model_param_quarantine_household_contacts_on_symptoms( model *model, int value ); int set_model_param_test_on_symptoms(model *model, int value); int set_model_param_test_on_traced( model *model, int value ); int set_model_param_test_release_on_negative( model *model, int value ); int set_model_param_test_result_wait( model *model, int value ); int set_model_param_test_order_wait( model *model, int value ); int set_model_param_test_result_wait_priority( model *model, int value ); int set_model_param_test_order_wait_priority( model *model, int value ); int set_model_param_priority_test_contacts( model *model, int value, int idx ); int set_model_param_app_users_fraction( model *model, double value ); int set_model_param_relative_transmission( model *model, double value, int type ); int set_model_param_app_turned_on( model *model, int value ); void update_work_intervention_state(model *model, int value); void update_household_intervention_state(model *model, int value); int set_model_param_lockdown_on( model *model, int value ); int set_model_param_lockdown_elderly_on( model *model, int value ); int set_model_param_lockdown_house_interaction_multiplier( model *model, double value ); int set_model_param_lockdown_random_network_multiplier( model *model, double value ); int set_model_param_lockdown_occupation_multiplier( model *model, double value, int idx ); int set_model_param_manual_traceable_fraction( model *model, double value, int type ); int set_model_param_manual_trace_on_hospitalization( model* model, int value ); int set_model_param_manual_trace_on_positive( model* model, int value ); int set_model_param_manual_trace_delay( model* model, int value ); int set_model_param_manual_trace_exclude_app_users( model* model, int value ); int set_model_param_manual_trace_n_workers( model* model, int value ); int set_model_param_manual_trace_interviews_per_worker_day( model* model, int value ); int set_model_param_manual_trace_notifications_per_worker_day( model* model, int value ); void check_params( parameters *params ); int set_model_param_fatality_fraction(model * model, double value, int age_group); void check_hospital_params( parameters *params ); void destroy_occupation_network_table(parameters *params); void destroy_params( parameters *params );
aec6e2727e752af6d3028ad95d9c077a427d09f78fa6947bcd7343c377d24aab
123
FireLord1
android_kernel_samsung_smdk5260
drivers/media/video/exynos/fimc-is/sensor/fimc-is-device-m7mu.c
m7mu_quickshot_init
static int m7mu_quickshot_init(int option) { if (option == 0) { if (m7mu_quickshot_called == 0) m7mu_quickshot_on = 0; } else { if (m7mu_quickshot_on == 0) m7mu_quickshot_holdlens = 0; m7mu_quickshot_called = 0; } return 0; }
static inline struct fimc_is_module_enum *to_module(struct v4l2_subdev *subdev); static inline struct m7mu_state *to_state(struct v4l2_subdev *subdev); static inline struct i2c_client *to_client(struct v4l2_subdev *subdev); static int m7mu_mem_dump(struct v4l2_subdev *sd, u16 len, u32 addr, u8 *val); static int m7mu_mem_read(struct v4l2_subdev *sd, u16 len, u32 addr, u8 *val); static int m7mu_eep_rw_start(struct v4l2_subdev *sd, u32 addr); static int m7mu_which_power_on(void); static int m7mu_which_power_off(void); static int m7mu_wait_framesync(struct v4l2_subdev *sd); static int m7mu_set_smart_auto_default_value(struct v4l2_subdev *sd, int val); static int m7mu_set_mode(struct v4l2_subdev *sd, u32 mode); static int m7mu_set_mode_part1(struct v4l2_subdev *sd, u32 mode); static int m7mu_set_mode_part2(struct v4l2_subdev *sd, u32 mode); static int m7mu_set_cap_rec_end_mode(struct v4l2_subdev *sd, u32 mode); static int m7mu_set_OIS_cap_mode(struct v4l2_subdev *sd); static void m7mu_init_parameters(struct v4l2_subdev *subdev); static int m7mu_set_oprmode_mode(struct v4l2_subdev *subdev, int oprmode); static int m7mu_set_capture_mode(struct v4l2_subdev *sd, int val); static int m7mu_queryctrl(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc); static int m7mu_set_lock(struct v4l2_subdev *sd, int val); static int m7mu_set_CAF(struct v4l2_subdev *sd, int val); static int m7mu_get_av(struct v4l2_subdev *sd, struct v4l2_control *ctrl); static int m7mu_get_tv(struct v4l2_subdev *sd, struct v4l2_control *ctrl); static int m7mu_get_sv(struct v4l2_subdev *sd, struct v4l2_control *ctrl); static int m7mu_get_ev(struct v4l2_subdev *sd, struct v4l2_control *ctrl); static int m7mu_get_lv(struct v4l2_subdev *sd, struct v4l2_control *ctrl); static int m7mu_get_WBcustomX(struct v4l2_subdev *sd, struct v4l2_control *ctrl); static int m7mu_get_WBcustomY(struct v4l2_subdev *sd, struct v4l2_control *ctrl); static int m7mu_get_check_sum(struct v4l2_subdev *sd, struct v4l2_control *ctrl); static int m7mu_get_factory_mem_compare(struct v4l2_subdev *sd); static int m7mu_g_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl); static int m7mu_set_lens_off(struct v4l2_subdev *sd); static int m7mu_dump_fw(struct v4l2_subdev *sd); static int m7mu_get_sensor_fw_version(struct v4l2_subdev *sd); static int m7mu_get_phone_fw_version(struct v4l2_subdev *sd); static int m7mu_check_checksum(struct v4l2_subdev *sd); static int m7mu_set_factory_data_erase(struct v4l2_subdev *sd, int val); static int m7mu_read_shd_data(struct v4l2_subdev *sd, int idx); static int m7mu_set_shd_data(struct v4l2_subdev *sd, int idx); static int m7mu_set_clip_value(struct v4l2_subdev *sd, int val); static int m7mU_set_tilt_location(struct v4l2_subdev *sd, int val); static int m7mu_check_fw(struct v4l2_subdev *sd); static int m7mu_wait_make_CSV_rawdata(struct v4l2_subdev *sd); static int m7mu_make_CSV_rawdata_direct(struct v4l2_subdev *sd, int nkind); static int m7mu_set_fast_capture(struct v4l2_subdev *sd); static int m7mu_set_snapshot_size(struct v4l2_subdev *sd, uint32_t value); static int m7mu_set_sensor_mode(struct v4l2_subdev *sd, int val); static int m7mu_set_flash_evc_step(struct v4l2_subdev *sd, int val); static int m7mu_set_flash(struct v4l2_subdev *sd, int val, int force); static int m7mu_set_flash_batt_info(struct v4l2_subdev *sd, int val); static int m7mu_set_iso(struct v4l2_subdev *sd, struct v4l2_control *ctrl); static int m7mu_set_metering(struct v4l2_subdev *sd, int val); static int m7mu_set_whitebalance(struct v4l2_subdev *sd, int val); static int m7mu_set_coloradjust(struct v4l2_subdev *sd, int val); static int m7mu_set_reset_cwb(struct v4l2_subdev *sd, int val); static int m7mu_set_sharpness(struct v4l2_subdev *sd, struct v4l2_control *ctrl); static int m7mu_set_contrast(struct v4l2_subdev *sd, struct v4l2_control *ctrl); static int m7mu_set_scene_mode(struct v4l2_subdev *sd, int val); static int m7mu_set_effect_color(struct v4l2_subdev *sd, int val); static int m7mu_set_effect_point(struct v4l2_subdev *sd, int val); static int m7mu_set_effect(struct v4l2_subdev *sd, int val); static int m7mu_set_wdr(struct v4l2_subdev *sd, int val); static int m7mu_set_antishake(struct v4l2_subdev *sd, int val); static int m7mu_set_face_beauty(struct v4l2_subdev *sd, int val); static int m7mu_set_object_tracking(struct v4l2_subdev *sd, int val); static int m7mu_set_image_stabilizer_OIS(struct v4l2_subdev *sd, int val); static int m7mu_set_af_sensor_mode(struct v4l2_subdev *sd, int val); static int m7mu_set_af(struct v4l2_subdev *sd, int val); static int m7mu_set_af_mode(struct v4l2_subdev *sd, int val); static int m7mu_set_focus_range(struct v4l2_subdev *sd, int val); static int m7mu_set_focus_area_mode(struct v4l2_subdev *sd, int val); static int m7mu_set_touch_auto_focus(struct v4l2_subdev *sd, int val); static int m7mu_set_AF_LED(struct v4l2_subdev *sd, int val); static int m7mu_set_Turn_AF_LED(struct v4l2_subdev *sd, int val); static int m7mu_set_timer_Mode(struct v4l2_subdev *sd, int val); static int m7mu_set_timer_LED(struct v4l2_subdev *sd, int val); static int m7mu_set_zoom_action_method(struct v4l2_subdev *sd, int val); static int m7mu_set_zoom(struct v4l2_subdev *sd, struct v4l2_control *ctrl); static int m7mu_set_dzoom(struct v4l2_subdev *sd, struct v4l2_control *ctrl); static int m7mu_set_zoom_ctrl(struct v4l2_subdev *sd, int val); static int m7mu_set_zoom_speed(struct v4l2_subdev *sd, int zoom_speed); static int m7mu_set_smart_zoom(struct v4l2_subdev *sd, int val); static int m7mu_get_exif(struct v4l2_subdev *sd); static int m7mu_set_Nsm_system(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_state(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_reset(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_command(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_RGB(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_ContSharp(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_Hue_AllRedOrange(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_Hue_YellowGreenCyan(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_BlueVioletPurple(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_Sat_AllRedOrange(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_Sat_YellowGreenCyan(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_Sat_BlueVioletPurple(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_r(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_g(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_b(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_global_contrast(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_sharpness(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_hue_all(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_hue_red(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_hue_orange(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_hue_yellow(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_hue_green(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_hue_cyan(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_hue_blue(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_hue_violet(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_hue_purple(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_sat_all(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_sat_red(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_sat_orange(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_sat_yellow(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_sat_green(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_sat_cyan(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_sat_blue(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_sat_violet(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_sat_purple(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_fd_write(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_FilmID(struct v4l2_subdev *sd, int val); static int m7mu_set_Nsm_langnum(struct v4l2_subdev *sd, int val); static int m7mu_get_fd_eye_blink_result(struct v4l2_subdev *sd); static int m7mu_get_red_eye_fix_result(struct v4l2_subdev *sd); static int m7mu_start_dual_postview(struct v4l2_subdev *sd, int frame_num); static int m7mu_start_dual_capture(struct v4l2_subdev *sd, int frame_num); static int m7mu_start_postview_capture(struct v4l2_subdev *sd, int frame_num); static int m7mu_start_YUV_capture(struct v4l2_subdev *sd, int frame_num); static int m7mu_start_YUV_one_capture(struct v4l2_subdev *sd, int frame_num); static int m7mu_start_capture(struct v4l2_subdev *sd, int frame_num); static int m7mu_start_combined_capture(struct v4l2_subdev *sd, int frame_num); static int m7mu_start_capture_thumb(struct v4l2_subdev *sd, int frame_num); static int m7mu_set_facedetect(struct v4l2_subdev *sd, int val); static int m7mu_set_bracket_aeb(struct v4l2_subdev *sd, int val); static int m7mu_set_bracket_wbb(struct v4l2_subdev *sd, int val); static int m7mu_set_bracket(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_cam_sys_mode(struct v4l2_subdev *sd, int val); static int m7mu_set_fps(struct v4l2_subdev *sd, int val); static int m7mu_set_time_info(struct v4l2_subdev *sd, int val); static int m7mu_set_lens_off_timer(struct v4l2_subdev *sd, int val); static int m7mu_set_widget_mode_level(struct v4l2_subdev *sd, int val); static int m7mu_set_LDC(struct v4l2_subdev *sd, int val); static int m7mu_set_LSC(struct v4l2_subdev *sd, int val); static int m7mu_set_aperture_preview(struct v4l2_subdev *sd, int val); static int m7mu_set_aperture_capture(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_OIS(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_OIS_shift(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_punt(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_zoom(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_zoom_step(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_fail_stop(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_nodefocus(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_interpolation(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_common(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_vib(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_gyro(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_backlash(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_backlash_count(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_af(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_af_step(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_af_position(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_defocus(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_defocus_wide(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_defocus_tele(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_resol_cap(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_af_zone(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_af_lens(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_adj_iris(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_sh_close(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_adj_gain_liveview(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_flicker(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_capture_gain(struct v4l2_subdev *sd, int val); static int m7mu_set_image_stabilizer_mode(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_capture_ctrl(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_flash(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_wb(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_defectpixel(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_tilt(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_IR_Check(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_IR_Check_GAvg(struct v4l2_subdev *sd, int val); static int m7mu_shd_table_write(struct v4l2_subdev *sd, int idx); static int m7mu_set_factory_shading(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_adjust_log(struct v4l2_subdev *sd, int val); static int m7mu_set_factory_backup_mem_data(struct v4l2_subdev *sd, int val); static int m7mu_send_factory_command_value(struct v4l2_subdev *sd); static int m7mu_set_factory_eepwrite_mark(struct v4l2_subdev *sd, int val); static int m7mu_set_aeawblock(struct v4l2_subdev *sd, int val); static int m7mu_set_aelock(struct v4l2_subdev *sd, int val); static int m7mu_set_GBAM(struct v4l2_subdev *sd, int val); static int m7mu_set_K(struct v4l2_subdev *sd, int val); static int m7mu_set_dual_capture_mode(struct v4l2_subdev *sd, int val); static int m7mu_start_set_dual_capture(struct v4l2_subdev *sd, int frame_num); static int m7mu_set_smart_moving_recording(struct v4l2_subdev *sd, int val); static int m7mu_continue_proc(struct v4l2_subdev *sd, int val); static int m7mu_burst_set_postview_size(struct v4l2_subdev *sd, int val); static int m7mu_burst_set_snapshot_size(struct v4l2_subdev *sd, int val); static int m7mu_set_capture_cnt(struct v4l2_subdev *sd, int val); static int m7mu_burst_proc(struct v4l2_subdev *sd, int val); static int m7mu_set_iqgrp(struct v4l2_subdev *sd, int val); static int m7mu_set_gamma(struct v4l2_subdev *sd); static int m7mu_set_PASM_mode(struct v4l2_subdev *sd, int val); static int m7mu_set_shutter_speed(struct v4l2_subdev *sd, int val); static int m7mu_set_f_number(struct v4l2_subdev *sd, int val); static int m7mu_set_wb_custom(struct v4l2_subdev *sd, int val); static int m7mu_set_smart_auto_s1_push(struct v4l2_subdev *sd, int val); static int m7mu_set_mon_size(struct v4l2_subdev *sd, int val); static int m7mu_check_dataline(struct v4l2_subdev *sd, int val); static int m7mu_check_esd(struct v4l2_subdev *sd); static int m7mu_check_manufacturer_id(struct v4l2_subdev *sd); static int m7mu_load_fw_main(struct v4l2_subdev *sd); static int m7mu_load_fw_info(struct v4l2_subdev *sd); static int m7mu_load_fw(struct v4l2_subdev *sd); static int m7mu_set_factory_af_led_onoff(struct v4l2_subdev *sd, bool on); static int m7mu_get_noti(struct v4l2_subdev *sd, struct v4l2_control *ctrl); static int m7mu_noti_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl); static int m7mu_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl); static bool m7mu_check_postview(struct v4l2_subdev *sd); static int m7mu_set_size_val(struct v4l2_subdev *sd, int default_size); static int m7mu_set_frmsize(struct v4l2_subdev *sd); static int m7mu_s_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *ffmt); static int m7mu_g_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *a); static int m7mu_s_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *a); static int m7mu_s_stream_preview(struct v4l2_subdev *sd, int enable); static int m7mu_s_stream_capture(struct v4l2_subdev *sd, int enable); static int m7mu_s_stream(struct v4l2_subdev *sd, int enable); static int m7mu_check_version(struct v4l2_subdev *sd); static int m7mu_init_param(struct v4l2_subdev *sd); static int m7mu_fw_writing(struct v4l2_subdev *sd); static int m7mu_fw_writing_vacant(struct v4l2_subdev *sd); static int m7mu_ois_init(struct v4l2_subdev *sd); static int m7mu_auto_fw_check(struct v4l2_subdev *sd); static int m7mu_pre_init(struct v4l2_subdev *sd, u32 val); static irqreturn_t m7mu_isp_sound_isr(int irq, void *dev_id); static ssize_t m7mu_register_sound_irq(struct v4l2_subdev *sd); static int m7mu_init(struct v4l2_subdev *sd, u32 val); static int m7mu_deinit(struct v4l2_subdev *sd); static int m7mu_post_init(struct v4l2_subdev *sd, u32 val); static int m7mu_cold_power(struct v4l2_subdev *sd, int flag); static void m7mu_power_off_func(struct work_struct *work); static int m7mu_power(struct v4l2_subdev *sd, int flag, int option); static int m7mu_power(struct v4l2_subdev *sd, int flag, int option); static int m7mu_s_power(struct v4l2_subdev *sd, int on); static int m7mu_init_formats(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh); int sensor_m7m_stream_on(struct v4l2_subdev *subdev); int sensor_m7m_stream_off(struct v4l2_subdev *subdev); int sensor_m7mu_ops_set(struct v4l2_subdev *subdev, u64 value); int sensor_m7mu_ops_get(struct v4l2_subdev *subdev); static irqreturn_t m7mu_isp_isr(int irq, void *dev_id); static irqreturn_t m7mu_isp_boot_isr(int irq, void *dev_id); static ssize_t m7mu_register_irq(struct v4l2_subdev *sd); static int m7mu_remove(struct i2c_client *client); static int __init m7mu_load(void); static void __exit m7mu_unload(void);
f811ede269537b176f51dfe80127dce7b546d834c588532f11c8096bd08c0533
242
mwweissmann
ocaml-uint
lib/uint64_conv.c
value uint64_of_float
CAMLprim value uint64_of_float(value v) { CAMLparam1(v); CAMLreturn (copy_uint64((uint64_t)Double_val(v))); }
6c90aab047f9336459d70d0f586433555954f4b63eb718fc88e63201571ed733
114
bl4ckic3
DynamoRIO-ARM
api/samples/bbcov.c
void event_thread_exit
static void event_thread_exit(void *drcontext) { per_thread_t *data; if (!bbcov_per_thread) return; data = (per_thread_t *)dr_get_tls_field(drcontext); ASSERT(data != NULL, "data must not be NULL"); if (options.dump_text || options.dump_binary) { module_table_print(module_table, data->log); bb_table_print(drcontext, data); } if (options.check) { bb_table_check_cbr(module_table, data); } thread_data_destroy(drcontext, data); }
864930c612acd903f8aee9b1f7e1d8d1c187f56d024601c03092ac7971af04fa
499
qewerty
moto.old
src/libmoto/moto-types.c
moto_value_set_bool2_v
void moto_value_set_bool2_v(GValue *value, const gboolean *v) { g_assert(G_VALUE_TYPE(value) == MOTO_TYPE_BOOL2); gboolean *p = g_value_peek_pointer(value); memcpy(p, v, sizeof(gboolean)*2); }
static void moto_bool2_value_init(GValue *value); static void moto_bool2_value_free(GValue *value); static void moto_bool2_value_copy(const GValue *src_value, GValue *dest_value); static gpointer moto_bool2_value_peek_pointer(const GValue *value); GType moto_bool2_get_type(void); static void moto_bool3_value_init(GValue *value); static void moto_bool3_value_free(GValue *value); static void moto_bool3_value_copy(const GValue *src_value, GValue *dest_value); static gpointer moto_bool3_value_peek_pointer(const GValue *value); GType moto_bool3_get_type(void); static void moto_bool4_value_init(GValue *value); static void moto_bool4_value_free(GValue *value); static void moto_bool4_value_copy(const GValue *src_value, GValue *dest_value); static gpointer moto_bool4_value_peek_pointer(const GValue *value); GType moto_bool4_get_type(void); static void moto_int2_value_init(GValue *value); static void moto_int2_value_free(GValue *value); static void moto_int2_value_copy(const GValue *src_value, GValue *dest_value); static gpointer moto_int2_value_peek_pointer(const GValue *value); GType moto_int2_get_type(void); static void moto_int3_value_init(GValue *value); static void moto_int3_value_free(GValue *value); static void moto_int3_value_copy(const GValue *src_value, GValue *dest_value); static gpointer moto_int3_value_peek_pointer(const GValue *value); GType moto_int3_get_type(void); static void moto_int4_value_init(GValue *value); static void moto_int4_value_free(GValue *value); static void moto_int4_value_copy(const GValue *src_value, GValue *dest_value); static gpointer moto_int4_value_peek_pointer(const GValue *value); GType moto_int4_get_type(void); static void moto_float2_value_init(GValue *value); static void moto_float2_value_free(GValue *value); static void moto_float2_value_copy(const GValue *src_value, GValue *dest_value); static gpointer moto_float2_value_peek_pointer(const GValue *value); GType moto_float2_get_type(void); static void moto_float3_value_init(GValue *value); static void moto_float3_value_free(GValue *value); static void moto_float3_value_copy(const GValue *src_value, GValue *dest_value); static gpointer moto_float3_value_peek_pointer(const GValue *value); GType moto_float3_get_type(void); static void moto_float4_value_init(GValue *value); static void moto_float4_value_free(GValue *value); static void moto_float4_value_copy(const GValue *src_value, GValue *dest_value); static gpointer moto_float4_value_peek_pointer(const GValue *value); GType moto_float4_get_type(void); static void moto_bool_array_value_init(GValue *value); static void moto_bool_array_value_free(GValue *value); static void moto_bool_array_value_copy(const GValue *src_value, GValue *dest_value); static gpointer moto_bool_array_value_peek_pointer(const GValue *value); GType moto_bool_array_get_type(void); static void moto_int_array_value_init(GValue *value); static void moto_int_array_value_free(GValue *value); static void moto_int_array_value_copy(const GValue *src_value, GValue *dest_value); static gpointer moto_int_array_value_peek_pointer(const GValue *value); GType moto_int_array_get_type(void); static void moto_float_array_value_init(GValue *value); static void moto_float_array_value_free(GValue *value); static void moto_float_array_value_copy(const GValue *src_value, GValue *dest_value); static gpointer moto_float_array_value_peek_pointer(const GValue *value); GType moto_float_array_get_type(void); static void moto_transform_bool_to_bool2(const GValue *src_value, GValue *dest_value); static void moto_transform_bool_to_bool3(const GValue *src_value, GValue *dest_value); static void moto_transform_bool_to_bool4(const GValue *src_value, GValue *dest_value); static void moto_transform_bool_to_int2(const GValue *src_value, GValue *dest_value); static void moto_transform_bool_to_int3(const GValue *src_value, GValue *dest_value); static void moto_transform_bool_to_int4(const GValue *src_value, GValue *dest_value); static void moto_transform_bool_to_float2(const GValue *src_value, GValue *dest_value); static void moto_transform_bool_to_float3(const GValue *src_value, GValue *dest_value); static void moto_transform_bool_to_float4(const GValue *src_value, GValue *dest_value); static void moto_transform_int_to_bool2(const GValue *src_value, GValue *dest_value); static void moto_transform_int_to_bool3(const GValue *src_value, GValue *dest_value); static void moto_transform_int_to_bool4(const GValue *src_value, GValue *dest_value); static void moto_transform_int_to_int2(const GValue *src_value, GValue *dest_value); static void moto_transform_int_to_int3(const GValue *src_value, GValue *dest_value); static void moto_transform_int_to_int4(const GValue *src_value, GValue *dest_value); static void moto_transform_int_to_float2(const GValue *src_value, GValue *dest_value); static void moto_transform_int_to_float3(const GValue *src_value, GValue *dest_value); static void moto_transform_int_to_float4(const GValue *src_value, GValue *dest_value); static void moto_transform_float_to_bool2(const GValue *src_value, GValue *dest_value); static void moto_transform_float_to_bool3(const GValue *src_value, GValue *dest_value); static void moto_transform_float_to_bool4(const GValue *src_value, GValue *dest_value); static void moto_transform_float_to_int2(const GValue *src_value, GValue *dest_value); static void moto_transform_float_to_int3(const GValue *src_value, GValue *dest_value); static void moto_transform_float_to_int4(const GValue *src_value, GValue *dest_value); static void moto_transform_float_to_float2(const GValue *src_value, GValue *dest_value); static void moto_transform_float_to_float3(const GValue *src_value, GValue *dest_value); static void moto_transform_float_to_float4(const GValue *src_value, GValue *dest_value); static void moto_transform_float2_to_float(const GValue *src_value, GValue *dest_value); static void moto_transform_float3_to_float(const GValue *src_value, GValue *dest_value); static void moto_transform_float4_to_float(const GValue *src_value, GValue *dest_value); void moto_types_init(void); gsize moto_value_get_float_array_size(GValue *value); gfloat* moto_value_get_float_array(GValue *value, gsize *size); void moto_value_set_float_array(GValue *value, const gfloat* data, gsize size); void moto_value_get_bool2(GValue *value, gboolean *v0, gboolean *v1); void moto_value_get_bool2_v(GValue *value, gboolean *v); void moto_value_get_bool3(GValue *value, gboolean *v0, gboolean *v1, gboolean *v2); void moto_value_get_bool3_v(GValue *value, gboolean *v); void moto_value_get_bool4(GValue *value, gboolean *v0, gboolean *v1, gboolean *v2, gboolean *v3); void moto_value_get_bool4_v(GValue *value, gboolean *v); void moto_value_get_int2(GValue *value, gint *v0, gint *v1); void moto_value_get_int2_v(GValue *value, gint *v); void moto_value_get_int3(GValue *value, gint *v0, gint *v1, gint *v2); void moto_value_get_int3_v(GValue *value, gint *v); void moto_value_get_int4(GValue *value, gint *v0, gint *v1, gint *v2, gint *v3); void moto_value_get_int4_v(GValue *value, gint *v); void moto_value_get_float2(GValue *value, gfloat *v0, gfloat *v1); void moto_value_get_float2_v(GValue *value, gfloat *v); void moto_value_get_float3(GValue *value, gfloat *v0, gfloat *v1, gfloat *v2); void moto_value_get_float3_v(GValue *value, gfloat *v); void moto_value_get_float4(GValue *value, gfloat *v0, gfloat *v1, gfloat *v2, gfloat *v3); void moto_value_get_float4_v(GValue *value, gfloat *v); void moto_value_set_bool2(GValue *value, gboolean v0, gboolean v1); void moto_value_set_bool3(GValue *value, gboolean v0, gboolean v1, gboolean v2); void moto_value_set_bool3_v(GValue *value, const gboolean *v); void moto_value_set_bool4(GValue *value, gboolean v0, gboolean v1, gboolean v2, gboolean v3); void moto_value_set_bool4_v(GValue *value, const gboolean *v); void moto_value_set_int2(GValue *value, gint v0, gint v1); void moto_value_set_int2_v(GValue *value, const gint *v); void moto_value_set_int3(GValue *value, gint v0, gint v1, gint v2); void moto_value_set_int3_v(GValue *value, const gint *v); void moto_value_set_int4(GValue *value, gint v0, gint v1, gint v2, gint v3); void moto_value_set_int4_v(GValue *value, const gint *v); void moto_value_set_float2(GValue *value, gfloat v0, gfloat v1); void moto_value_set_float2_v(GValue *value, const gfloat *v); void moto_value_set_float3(GValue *value, gfloat v0, gfloat v1, gfloat v2); void moto_value_set_float3_v(GValue *value, const gfloat *v); void moto_value_set_float4(GValue *value, gfloat v0, gfloat v1, gfloat v2, gfloat v3); void moto_value_set_float4_v(GValue *value, const gfloat *v);
ba7d1b3786a593801bba916b0a8c8cf9eee9a4e908b5cb3604fcb63aea03bf2a
205
ariafan
S5501-3.10
drivers/input/touchscreen/mediatek/synaptics/synaptics_dsx_i2c.c
set_Delicacy_enable
void set_Delicacy_enable() { int retval = 0; struct synaptics_rmi4_fn *fhandler; struct synaptics_rmi4_device_info *rmi; struct synaptics_rmi4_f12_extra_data *extra_data; struct synaptics_rmi4_data *rmi4_data = dev_get_drvdata(g_dev); rmi = &(rmi4_data->rmi4_mod_info); list_for_each_entry(fhandler, &rmi->support_fn_list, link) { if (fhandler->fn_number == SYNAPTICS_RMI4_F12) { printk("=======synaptics_rmi4_f12_wg======find====\n"); break; } } extra_data = (struct synaptics_rmi4_f12_extra_data *)fhandler->extra; unsigned char Delicacy = 0x21; printk("===========synaptics_rmi4_f12_abs_report==TP_Delicacy===================true start====\n"); printk("[syna]:ctrl_base:%x, ctrl23_offset:%x\n", fhandler->full_addr.ctrl_base,extra_data->ctrl23_offset); retval = synaptics_rmi4_i2c_write(rmi4_data,fhandler->full_addr.ctrl_base+extra_data->ctrl23_offset,&Delicacy,sizeof(Delicacy)); if (retval < 0) { printk(&(rmi4_data->input_dev->dev),"%s: Failed to enable single gesture\n",__func__); printk("===========synaptics_rmi4_f12_abs_report==TP_Delicacy===================true end====\n"); return 0; } unsigned char Delicacy_enable = 0x01; retval = synaptics_rmi4_i2c_write(rmi4_data, fhandler->full_addr.ctrl_base+extra_data->ctrl26_offset, &Delicacy_enable, sizeof(Delicacy_enable)); if (retval < 0) { printk(&(rmi4_data->input_dev->dev),"%s: Failed to enable single gesture\n",__func__); return; } printk("==========set__Delicacy_enable==============\n"); return; }
static void synaptics_rmi4_sensor_report(struct synaptics_rmi4_data *rmi4_data); static void tpd_eint_handler(void); static int touch_event_handler(void *data); static void synaptics_rmi4_f1a_kfree(struct synaptics_rmi4_fn *fhandler); static void synaptics_rmi4_empty_fn_list(struct synaptics_rmi4_data *rmi4_data); static void synaptics_rmi4_set_configured(struct synaptics_rmi4_data *rmi4_data); static int synaptics_rmi4_query_device(struct synaptics_rmi4_data *rmi4_data); static void synaptics_rmi4_set_params(struct synaptics_rmi4_data *rmi4_data); static int synaptics_rmi4_set_input_dev(struct synaptics_rmi4_data *rmi4_data); static int synaptics_rmi4_free_fingers(struct synaptics_rmi4_data *rmi4_data); static int synaptics_rmi4_reinit_device(struct synaptics_rmi4_data *rmi4_data); static int synaptics_rmi4_reset_device(struct synaptics_rmi4_data *rmi4_data); static void synaptics_rmi4_exp_fn_work(struct work_struct *work); int sy_open(struct inode *inode, struct file *filp); int sy_release(struct inode *inode, struct file *filp); static ssize_t sy_write(struct file *filp, const char *buff, size_t count, loff_t *offp); ssize_t sy_read(struct file *filp, char *buff, size_t count, loff_t *offp); void synaptics_chip_reset(); static long sy_ioctl(/*struct inode *inode,*/ struct file *filp, unsigned int cmd, unsigned long arg); static int synaptics_rmi4_remove(struct i2c_client *client); static void synaptics_rmi4_sensor_sleep(struct synaptics_rmi4_data *rmi4_data); static void synaptics_rmi4_sensor_wake(struct synaptics_rmi4_data *rmi4_data); static void synaptics_rmi4_early_suspend(struct early_suspend *h); static void synaptics_rmi4_late_resume(struct early_suspend *h); void set_tgesture_enable(); void set_tgesture_unenable(); void set_Delicacy_unenable(); void set_sleep_unenable(); static int synaptics_rmi4_suspend(struct device *dev); static int synaptics_rmi4_resume(struct device *dev); static int tpd_local_init(void); char* get_synaptics_fw_name(void); char* get_synaptics_IC_name(void); char* get_synaptics_TpName( void ); char* get_synaptics_Version( void ); static int __init synaptics_rmi4_init(void); static void __exit synaptics_rmi4_exit(void);
c27323832a775b11790c1cb96c50e2740f439f4bcf2ca4cbb074a269aba0f3af
1,623
JulienFerte
mmtf-c
src/mmtf_parser2.c
MMTF_parser_MMTF_container_empty
MMTF_container* MMTF_parser_MMTF_container_empty( MMTF_container* result ) { if( result != NULL ) { MMTF_parser_MMTF_container_destroy_inside( result ); MMTF_parser_MMTF_container_initialize( result ); } else { fprintf( stderr, "Error in %s: the argument you put is NULL, it is not a valid pointer.\n", __FUNCTION__ ); } return result; }
MMTF_container* MMTF_parser_MMTF_container_new( void ); MMTF_BioAssembly* MMTF_parser_MMTF_BioAssembly_new( void ); MMTF_Transform* MMTF_parser_MMTF_Transform_new( void ); MMTF_Entity* MMTF_parser_MMTF_Entity_new( void ); MMTF_GroupType* MMTF_parser_MMTF_GroupType_new( void ); MMTF_container* MMTF_parser_MMTF_container_initialize( MMTF_container* result ); MMTF_BioAssembly* MMTF_parser_MMTF_BioAssembly_initialize( MMTF_BioAssembly* result ); MMTF_Transform* MMTF_parser_MMTF_Transform_initialize( MMTF_Transform* result ); MMTF_Entity* MMTF_parser_MMTF_Entity_initialize( MMTF_Entity* result ); MMTF_GroupType* MMTF_parser_MMTF_GroupType_initialize( MMTF_GroupType* result ); MMTF_BioAssembly* MMTF_parser_MMTF_BioAssembly_empty( MMTF_BioAssembly* result ); MMTF_Transform* MMTF_parser_MMTF_Transform_empty( MMTF_Transform* result ); MMTF_Entity* MMTF_parser_MMTF_Entity_empty( MMTF_Entity* result ); MMTF_GroupType* MMTF_parser_MMTF_GroupType_empty( MMTF_GroupType* result ); MMTF_container* MMTF_parser_MMTF_container_destroy_inside( MMTF_container* thing ); MMTF_BioAssembly* MMTF_parser_MMTF_BioAssembly_destroy_inside( MMTF_BioAssembly* bio_assembly ); MMTF_Transform* MMTF_parser_MMTF_Transform_destroy_inside( MMTF_Transform* transform ); MMTF_Entity* MMTF_parser_MMTF_Entity_destroy_inside( MMTF_Entity* entity ); MMTF_GroupType* MMTF_parser_MMTF_GroupType_destroy_inside( MMTF_GroupType* group_type ); void MMTF_parser_MMTF_container_destroy( MMTF_container* thing ); void MMTF_parser_MMTF_BioAssembly_destroy( MMTF_BioAssembly* bio_assembly ); void MMTF_parser_MMTF_Transform_destroy( MMTF_Transform* transform ); void MMTF_parser_MMTF_Entity_destroy( MMTF_Entity* entity ); void MMTF_parser_MMTF_GroupType_destroy( MMTF_GroupType* group_type ); float* MMTF_parser_float_from_bytes( const char* input, uint32_t input_length, uint32_t* output_length ); int8_t* MMTF_parser_int8_from_bytes( const char* input, uint32_t input_length, uint32_t* output_length ); int16_t* MMTF_parser_int16_from_bytes( const char* input, uint32_t input_length, uint32_t* output_length ); int MMTF_parser_get_strategy(const char * bytes); int MMTF_parser_get_len(const char * bytes); int MMTF_parser_get_param(const char * bytes); int32_t* MMTF_parser_int32_from_bytes( const char* input, const uint32_t input_length, uint32_t* output_length ); char* MMTF_parser_string_from_int32( const int32_t* input, const uint32_t input_length, uint32_t* output_length ); char** MMTF_parser_strings_from_bytes( const char* input, uint32_t input_length, uint32_t parameter, uint32_t* output_length ); int32_t* MMTF_parser_run_length_decode( int32_t* input, uint32_t input_length, uint32_t* output_length ); int32_t* MMTF_parser_delta_decode( int32_t* input, uint32_t input_length, uint32_t* output_length ); int32_t* MMTF_parser_recursive_indexing_decode_from_16( int16_t* input, uint32_t input_length, uint32_t* output_length ); int32_t* MMTF_parser_recursive_indexing_decode_from_8( int8_t* input, uint32_t input_length, uint32_t* output_length ); float* MMTF_parser_integer_decode_from_16( int16_t* input, uint32_t input_length, int32_t parameter, uint32_t* output_length ); float* MMTF_parser_integer_decode_from_32( int32_t* input, uint32_t input_length, int32_t parameter, uint32_t* output_length ); void* MMTF_parser_decode_apply_strategy( const char* input, uint32_t input_length, uint32_t* output_length, int strategy, int32_t parameter ); char* MMTF_parser_fetch_string( msgpack_object* object ); char MMTF_parser_fetch_char( msgpack_object* object ); uint64_t MMTF_parser_fetch_int( msgpack_object* object ); float MMTF_parser_fetch_float( msgpack_object* object ); void* MMTF_parser_fetch_array( msgpack_object* object, uint64_t* length ); size_t* MMTF_parser_fetch_clear_lu_array( msgpack_object* object, uint64_t* length ); int* MMTF_parser_fetch_clear_int_array( msgpack_object* object, uint64_t* length ); int32_t* MMTF_parser_fetch_clear_int32_array( msgpack_object* object, uint64_t* length ); char* MMTF_parser_fetch_clear_int8_array( msgpack_object* object, uint64_t* length ); float* MMTF_parser_fetch_clear_float_array( msgpack_object* object, uint64_t* length ); char** MMTF_parser_fetch_clear_string_array( msgpack_object* object, uint64_t* length ); bool MMTF_parser_compare_msgpack_string_char_array( const msgpack_object_str* m_string, const char* string ); MMTF_Entity* MMTF_parser_fetch_entityList( msgpack_object* object, uint64_t* length ); void MMTF_parser_put_entity( msgpack_object* object, MMTF_Entity* entity ); MMTF_GroupType* MMTF_parser_fetch_groupList( msgpack_object* object, uint64_t* length ); void MMTF_parser_put_groupType( msgpack_object* object, MMTF_GroupType* group_type ); MMTF_BioAssembly* MMTF_parser_fetch_bioAssemblyList( msgpack_object* object, uint64_t* length ); void MMTF_parser_put_bioAssembly( msgpack_object* object, MMTF_BioAssembly* bio_assembly ); MMTF_Transform* MMTF_parser_fetch_transformList( msgpack_object* object, uint64_t* length ); void MMTF_parser_put_transform( msgpack_object* object, MMTF_Transform* transform ); void MMTF_parser_msgpack_object_to_MMTF_container(msgpack_object* object, MMTF_container* thing); void MMTF_parser_parse_msgpack(char *buffer,int msgsize, MMTF_container* thing); void MMTF_parser_MMTF_container_from_file(char *name, MMTF_container* thing);
771e718d9c8f59da32b09033ea62a4d4d4e22d1b125b02356f63d9c28f74f4e8
354
ayttm
ayttm
src/chat_window.c
ay_chat_window_printr
void ay_chat_window_printr(chat_window *cw, gchar *o_message) { if (!o_message || !o_message[0]) return; html_text_buffer_append(GTK_TEXT_VIEW(cw->chat), o_message, HTML_IGNORE_END | (iGetLocalPref("do_ignore_back") ? HTML_IGNORE_BACKGROUND : HTML_IGNORE_NONE) | (iGetLocalPref("do_ignore_fore") ? HTML_IGNORE_FOREGROUND : HTML_IGNORE_NONE) | (iGetLocalPref("do_ignore_font") ? HTML_IGNORE_FONT : HTML_IGNORE_NONE)); #ifdef __MINGW32__ redraw_chat_window(cw->chat); #endif }
static void redraw_chat_window(GtkWidget *text); static GtkWidget *ay_chat_get_tab_label(GtkNotebook *notebook, GtkWidget *child); static int should_window_raise(const char *message); static void ay_chat_window_updated(chat_window *cw, const char *message); static void remove_smiley_window(chat_window *cw); void remove_from_chat_window_list(chat_window *cw); static void destroy_event(GtkWidget *widget, gpointer userdata); static gboolean cw_close_win(GtkWidget *window, gpointer userdata); static void close_tab_callback(GtkWidget *button, gpointer userdata); void ay_chat_window_free(chat_window *cw); static void add_unknown_callback(GtkWidget *add_button, gpointer userdata); static char *cw_get_message(chat_window *cw); static int cw_set_message(chat_window *cw, char *msg); static void cw_reset_message(chat_window *cw); void send_message(GtkWidget *widget, gpointer d); static void view_log_callback(GtkWidget *widget, gpointer d); static void action_callback(GtkWidget *widget, gpointer d); static void ignore_dialog_callback(gpointer userdata, int response); static void ignore_callback(GtkWidget *ignore_button, gpointer userdata); static void send_file(GtkWidget *sendf_button, gpointer userdata); static void cw_set_sound_active(chat_window *cw, int active); static int cw_get_sound_active(chat_window *cw); static void set_sound_callback(GtkWidget *sound_button, gpointer userdata); static void get_group_contacts(gchar *group, chat_window *cw); static void get_contacts(chat_window *cw); static void invite_callback(GtkWidget *dialog, int response, gpointer data); static void do_invite_window(GtkWidget *source, gpointer data); static void change_local_account_on_click(GtkWidget *button, gpointer userdata); static GtkWidget *get_local_accounts(Conversation *cw); static void chat_away_set_back(void *data, int value); static void chat_warn_if_away(chat_window *cw); static void chat_history_up(chat_window *cw); static void chat_history_down(chat_window *cw); static void chat_scroll(chat_window *cw, GdkEventKey *event); gboolean chat_key_press(GtkWidget *widget, GdkEventKey *event, gpointer data); static chat_window *find_current_chat_window(); static void _show_smileys_cb(GtkWidget *widget, smiley_callback_data *data); int ay_chat_window_raise(chat_window *cw, const char *message); void ay_chat_window_print_message(chat_window *cw, gchar *o_message, int send); void ay_chat_window_print(chat_window *cw, gchar *o_message); void eb_chat_window_display_status(eb_account *remote, gchar *message); static void destroy_smiley_cb_data(GtkWidget *widget, gpointer data); void ay_chat_window_set_name(chat_window *cw); void ay_chat_window_fellows_append(chat_window *cw, ConversationFellow *fellow); void ay_chat_window_fellows_rename(chat_window *cw, ConversationFellow *fellow); void ay_chat_window_fellows_remove(chat_window *cw, ConversationFellow *fellow); chat_window *ay_chat_window_new(Conversation *conv); void ay_set_chat_encoding(GtkWidget *widget, void *data); static GList *chat_service_list(GtkComboBox *service_list); static LList *get_chatroom_mru(void); static void load_chatroom_mru(GtkComboBox *combo); static void add_chatroom_mru(const char *name); static void join_chat_callback(GtkWidget *widget, int response, gpointer data); static void update_public_sensitivity(GtkWidget *widget, gpointer data); static void choose_list_cb(const char *text, gpointer data); static void got_chatroom_list(LList *list, void *data); static void list_public_chatrooms(GtkWidget *widget, gpointer data); void open_join_chat_window();
30549f4433d3baa0147e06ff0cbf53018171e6305b5fa8abd0fd2ab037cf3728
500
mar-kolya
NetworkManager
libnm-core/nm-setting-user.c
gboolean _key_char_is_regular
static gboolean _key_char_is_regular (char ch) { return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9') || NM_IN_SET (ch, '-', '_', '+', '/', '='); }
NMSetting *nm_setting_user_new (void);
6a17c502951ce83d3133fc3caf95ff30c4c700bbf47aee14a8e99521ef916d1b
214
elsys
po-homework
A/04/25/task1.c
check_beginning
int check_beginning(char* input){ int i, valid1 = 0, valid2 = 0; char begg1[4] = "978-"; char begg2[4] = "979-"; for(i = 0; i < 4; i++){ if(input[i] == begg1[i]) valid1++; if(input[i] == begg2[i]) valid2++; } if(valid1 == 4 || valid2 == 4) return 1; return 0; }
int main(); int get_dashless(char* input, int length); int check_last_digit();
45182c9117457e4f012cb979e8d1a5e27b0cb3bbd41f59c1d5bef640fa26c66b
337
savke
ztask0
src/ztask_packet.c
* ztask_packet_new
ztask_packet_t * ztask_packet_new (char *cmd, zhash_t *data) { ztask_packet_t *self = (ztask_packet_t *) zmalloc (sizeof (ztask_packet_t)); self->id = 0; self->node = strdup (""); self->cmd = strdup (cmd); self->data = data; self->status = -1; return self; }
75220de08a71b8f8f9c71a55f953ba9c6e11edc59d483da874972bde4c62ed8a
288
niamster
judy-arrays
src/test_basic.c
main
int main(int argc, char **argv) { CU_pSuite suite = NULL; (void)argc, (void)argv; if (CUE_SUCCESS != CU_initialize_registry()) return CU_get_error(); if (!(suite = CU_add_suite("basic", init_suite, clean_suite))) goto out; if (!(CU_add_test(suite, "construction", test_construction))) goto out; if (!(CU_add_test(suite, "fill_binkeys", test_fill_binkeys))) goto out; CU_basic_run_tests(); out: CU_cleanup_registry(); return CU_get_error(); }
void test_construction(void); void test_fill_binkeys(void); int init_suite(void); int clean_suite(void);
4d89c69db4da3042387aa7b122db7464dbdd88cd4256ab80152b2a50bd36ca81
503
seidler2547
kernel-oxnas820
drivers/net/gmac/gmac-napi.c
change_rx_enable
static void change_rx_enable( gmac_priv_t *priv, u32 start, int waitForAck) { if (copro_active(priv)) { if (priv->copro_started) { unsigned long start_jiffies = jiffies; unsigned long irq_flags = 0; int cmd_queue_result = -1; while (cmd_queue_result) { spin_lock_irqsave(&priv->cmd_que_lock_, irq_flags); cmd_queue_result = cmd_que_queue_cmd(priv, GMAC_CMD_CHANGE_RX_ENABLE, start, waitForAck ? copro_rx_enable_callback : 0); spin_unlock_irqrestore(&priv->cmd_que_lock_, irq_flags); if (!cmd_queue_result) { writel(1UL << COPRO_SEM_INT_CMD, SYS_CTRL_SEMA_SET_CTRL); } else if (time_after(jiffies, start_jiffies + CMD_QUEUE_TIMEOUT_JIFFIES)) { printk(KERN_INFO "change_rx_enable() Timed-out of attempt to queue Leon command\n"); break; } else { printk(KERN_INFO "change_rx_enable() Failed to queue command with Leon\n"); msleep(100); } } if (waitForAck && !cmd_queue_result) { int sem_res; do { sem_res = down_timeout(&priv->copro_rx_enable_semaphore_, HZ); } while (sem_res && (sem_res != -ETIME)); if (sem_res == -ETIME) { printk(KERN_INFO "change_rx_enable() Timed out of wait for Rx enable\n"); } } } } else { start ? dma_reg_set_mask(priv, DMA_OP_MODE_REG, 1UL << DMA_OP_MODE_SR_BIT) : dma_reg_clear_mask(priv, DMA_OP_MODE_REG, 1UL << DMA_OP_MODE_SR_BIT); } }
static void dump_mac_regs(int unit, u32 macBase, u32 dmaBase); static void dump_sysctrl_regs(void); static void dump_secctrl_regs(void); static void dump_leon_tx_descs(gmac_priv_t *priv); static void dump_rx_descs(gmac_priv_t *priv); static void dump_leon_queues(gmac_priv_t *priv); static inline int offload_active(gmac_priv_t* priv); static inline int netoe_active(gmac_priv_t* priv); static void heartbeat_timer_action(unsigned long arg); static void configure_for_link_speed(gmac_priv_t *priv); static void change_pause_mode(gmac_priv_t *priv); static void refill_rx_ring(struct net_device *dev); static inline bool is_phy_interface_rgmii(int unit); static void initialise_phy(gmac_priv_t* priv); static void do_pre_reset_actions(gmac_priv_t* priv); static void do_post_reset_actions(gmac_priv_t* priv); static int gmac_link_state_hotplug_filter(struct kset* kset, struct kobject* kobj); static void work_handler(struct work_struct *ws); static void start_watchdog_timer(gmac_priv_t* priv); static void delete_watchdog_timer(gmac_priv_t* priv); static inline int is_auto_negotiation_in_progress(gmac_priv_t* priv); static void wait_autoneg_complete(gmac_priv_t* priv); static void watchdog_timer_action(unsigned long arg); static int inline is_ip_packet(unsigned short eth_protocol); static int inline is_ipv4_packet(unsigned short eth_protocol); static int inline is_ipv6_packet(unsigned short eth_protocol); static int inline is_hw_checksummable(unsigned short protocol); static int process_rx_packet_skb(gmac_priv_t *priv); static int process_rx_packet(gmac_priv_t *priv); static void netoe_finish_xmit(struct net_device *dev); static void copro_free_tx_resources(volatile gmac_tx_que_ent_t* job); static void copro_finish_xmit(struct net_device *dev); static void finish_xmit(struct net_device *dev); static void process_non_dma_ints(gmac_priv_t* priv, u32 raw_status); static irqreturn_t int_handler(int int_num, void* dev_id); static void gmac_down(struct net_device *dev); static int stop(struct net_device *dev); static void hw_set_mac_address(struct net_device *dev, unsigned char* addr); static int set_mac_address(struct net_device *dev, void *p); static void multicast_hash(struct dev_mc_list *dmi, u32 *hash_lo, u32 *hash_hi); static void set_multicast_list(struct net_device *dev); static int gmac_reset(struct net_device *dev); static int gmac_up(struct net_device *dev); static irqreturn_t copro_offload_intr(int irq, void *dev_id); static irqreturn_t copro_fwd_intr(int irq, void *dev_id); static int open(struct net_device *dev); static struct net_device_stats *get_stats(struct net_device *dev); static void netpoll(struct net_device *netdev); struct net_device* __init synopsys_gmac_probe(int unit); int cmd_que_dequeue_ack(cmd_que_t *queue); static inline void tx_que_inc_w_ptr(tx_que_t *queue); volatile gmac_tx_que_ent_t* tx_que_get_finished_job(struct net_device *dev); volatile gmac_tx_que_ent_t* tx_que_get_idle_job(struct net_device *dev); static int __init gmac_module_init(void); static void __exit gmac_module_cleanup(void); void post_phy_reset_action(struct net_device *dev);
b4f2647e2c9a5c2a56519296af767bf0996d50bdab0b85fc441c68934b89a8b6
1,476
carlosroh
radio_cogn
libs/algoritmo_genetico.c
sustituir
void sustituir(int selec[][8],int arre[][8],int arre2[ind]) { int ren,col; int col2=0; int temp[8]; for(ren=0;ren<ind;ren++) { for(col=0;col<8;col++) { arre[ren][col]=selec[(ind-1)-ren][7-col]; temp[col]=selec[(ind-1)-ren][7-col]; } col2=convertirDec(temp,arre2,col2); } }
int SeleccionPadres(int padres[ind],float acum[ind]); void cruzamiento(float pc, int selec[][8]); void mutacion(float pm, int selec[][8]); int convertirDec(int temp[ind],int arre2[ind],int col2); void calculos(int ren,int col,float func[ind],int arre2[ind],float acum[ind],int arre[][8]); void resul(int arre2[ind],float func[ind]);
b8e08a8165d65c0c5ef63b5705bdb32cf34337888c83fa958586a38287fe91c9
314
nuecho
telephony-unimrcp
plugins/mrcp-flite/src/flite_voices.c
flite_voices_best_match_get
cst_voice* flite_voices_best_match_get(flite_voices_t *voices, mrcp_message_t *message) { cst_voice *voice = NULL; const char *voice_name = NULL; mrcp_synth_header_t *synth_header = mrcp_resource_header_get(message); if(synth_header) { if(mrcp_resource_header_property_check(message,SYNTHESIZER_HEADER_VOICE_NAME) == TRUE) { voice_name = synth_header->voice_param.name.buf; } } if(voice_name) { flite_voice_t *flite_voice; flite_voice = apr_hash_get(voices->table,voice_name,APR_HASH_KEY_STRING); if(flite_voice) { voice = flite_voice->self; } } if(!voice) { flite_voice_t *flite_voice = NULL; void *val; apr_hash_index_t *it = apr_hash_first(voices->pool,voices->table); apr_hash_this(it,NULL,NULL,&val); if(val) { flite_voice = val; voice = flite_voice->self; } } return voice; }
static apt_bool_t flite_voices_init(flite_voices_t *voices, apr_pool_t *pool); flite_voices_t* flite_voices_load(apr_pool_t *pool); void flite_voices_unload(flite_voices_t *voices);
c076003c58bd0ca4dfeaffcb77844f5ab7a11e29ba4fe1aca0ad38d2649664f5
838
mambomark
linux-systemsim
drivers/mmc/host/usdhi6rol0.c
*usdhi6_sg_map
static void *usdhi6_sg_map(struct usdhi6_host *host) { struct mmc_data *data = host->mrq->data; struct scatterlist *sg = data->sg_len > 1 ? host->sg : data->sg; size_t head = PAGE_SIZE - sg->offset; size_t blk_head = head % data->blksz; WARN(host->pg.page, "%p not properly unmapped!\n", host->pg.page); if (WARN(sg_dma_len(sg) % data->blksz, "SG size %zd isn't a multiple of block size %zd\n", sg_dma_len(sg), data->blksz)) return NULL; host->pg.page = sg_page(sg); host->pg.mapped = kmap(host->pg.page); host->offset = sg->offset; host->head_len = blk_head; if (head < data->blksz) usdhi6_blk_bounce(host, sg); else host->blk_page = host->pg.mapped; dev_dbg(mmc_dev(host->mmc), "Mapped %p (%lx) at %p + %u for CMD%u @ 0x%p\n", host->pg.page, page_to_pfn(host->pg.page), host->pg.mapped, sg->offset, host->mrq->cmd->opcode, host->mrq); return host->blk_page + host->offset; }
static void usdhi6_write(struct usdhi6_host *host, u32 reg, u32 data); static void usdhi6_write16(struct usdhi6_host *host, u32 reg, u16 data); static u32 usdhi6_read(struct usdhi6_host *host, u32 reg); static u16 usdhi6_read16(struct usdhi6_host *host, u32 reg); static void usdhi6_irq_enable(struct usdhi6_host *host, u32 info1, u32 info2); static void usdhi6_wait_for_resp(struct usdhi6_host *host); static void usdhi6_wait_for_brwe(struct usdhi6_host *host, bool read); static void usdhi6_only_cd(struct usdhi6_host *host); static void usdhi6_mask_all(struct usdhi6_host *host); static int usdhi6_error_code(struct usdhi6_host *host); static void usdhi6_sg_prep(struct usdhi6_host *host); static void usdhi6_sg_unmap(struct usdhi6_host *host, bool force); static void usdhi6_sg_advance(struct usdhi6_host *host); static void usdhi6_dma_release(struct usdhi6_host *host); static void usdhi6_dma_stop_unmap(struct usdhi6_host *host); static void usdhi6_dma_complete(void *arg); static int usdhi6_dma_start(struct usdhi6_host *host); static void usdhi6_dma_kill(struct usdhi6_host *host); static void usdhi6_dma_check_error(struct usdhi6_host *host); static void usdhi6_dma_kick(struct usdhi6_host *host); static void usdhi6_dma_request(struct usdhi6_host *host, phys_addr_t start); static void usdhi6_clk_set(struct usdhi6_host *host, struct mmc_ios *ios); static void usdhi6_set_power(struct usdhi6_host *host, struct mmc_ios *ios); static int usdhi6_reset(struct usdhi6_host *host); static void usdhi6_set_ios(struct mmc_host *mmc, struct mmc_ios *ios); static void usdhi6_timeout_set(struct usdhi6_host *host); static void usdhi6_request_done(struct usdhi6_host *host); static int usdhi6_cmd_flags(struct usdhi6_host *host); static int usdhi6_rq_start(struct usdhi6_host *host); static void usdhi6_request(struct mmc_host *mmc, struct mmc_request *mrq); static int usdhi6_get_cd(struct mmc_host *mmc); static int usdhi6_get_ro(struct mmc_host *mmc); static void usdhi6_enable_sdio_irq(struct mmc_host *mmc, int enable); static void usdhi6_resp_cmd12(struct usdhi6_host *host); static void usdhi6_resp_read(struct usdhi6_host *host); static int usdhi6_blk_read(struct usdhi6_host *host); static int usdhi6_blk_write(struct usdhi6_host *host); static int usdhi6_stop_cmd(struct usdhi6_host *host); static bool usdhi6_end_cmd(struct usdhi6_host *host); static bool usdhi6_read_block(struct usdhi6_host *host); static bool usdhi6_mread_block(struct usdhi6_host *host); static bool usdhi6_write_block(struct usdhi6_host *host); static bool usdhi6_mwrite_block(struct usdhi6_host *host); static irqreturn_t usdhi6_sd_bh(int irq, void *dev_id); static irqreturn_t usdhi6_sd(int irq, void *dev_id); static irqreturn_t usdhi6_sdio(int irq, void *dev_id); static irqreturn_t usdhi6_cd(int irq, void *dev_id); static void usdhi6_timeout_work(struct work_struct *work); static int usdhi6_probe(struct platform_device *pdev); static int usdhi6_remove(struct platform_device *pdev);
6bc780c3d78627a63a4ce4de4f0af030cc02ab0f7a7087a30c07b95fa04bde1a
920
Dhollmen
Kernel_Wiko_5460
drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic_rx.c
nicRxFlush
WLAN_STATUS nicRxFlush(IN P_ADAPTER_T prAdapter) { P_SW_RFB_T prSwRfb; ASSERT(prAdapter); prSwRfb = qmFlushRxQueues(prAdapter); if (prSwRfb != NULL) { do { P_SW_RFB_T prNextSwRfb; prNextSwRfb = (P_SW_RFB_T) QUEUE_GET_NEXT_ENTRY((P_QUE_ENTRY_T) prSwRfb); nicRxReturnRFB(prAdapter, prSwRfb); prSwRfb = prNextSwRfb; } while (prSwRfb); } return WLAN_STATUS_SUCCESS; }
VOID nicRxInitialize(IN P_ADAPTER_T prAdapter); VOID nicRxUninitialize(IN P_ADAPTER_T prAdapter); VOID nicRxFillRFB(IN P_ADAPTER_T prAdapter, IN OUT P_SW_RFB_T prSwRfb); VOID nicRxFillChksumStatus(IN P_ADAPTER_T prAdapter, IN OUT P_SW_RFB_T prSwRfb, IN UINT_32 u4TcpUdpIpCksStatus); VOID nicRxProcessPktWithoutReorder(IN P_ADAPTER_T prAdapter, IN P_SW_RFB_T prSwRfb); VOID nicRxProcessForwardPkt(IN P_ADAPTER_T prAdapter, IN P_SW_RFB_T prSwRfb); VOID nicRxProcessGOBroadcastPkt(IN P_ADAPTER_T prAdapter, IN P_SW_RFB_T prSwRfb); VOID nicRxProcessDataPacket(IN P_ADAPTER_T prAdapter, IN OUT P_SW_RFB_T prSwRfb); UINT_8 nicRxProcessGSCNEvent(IN P_ADAPTER_T prAdapter, IN OUT P_SW_RFB_T prSwRfb); VOID nicRxProcessEventPacket(IN P_ADAPTER_T prAdapter, IN OUT P_SW_RFB_T prSwRfb); VOID nicRxProcessMgmtPacket(IN P_ADAPTER_T prAdapter, IN OUT P_SW_RFB_T prSwRfb); static VOID nicRxCheckWakeupReason(P_SW_RFB_T prSwRfb); VOID nicRxProcessRFBs(IN P_ADAPTER_T prAdapter); WLAN_STATUS nicRxReadBuffer(IN P_ADAPTER_T prAdapter, IN OUT P_SW_RFB_T prSwRfb); VOID nicRxReceiveRFBs(IN P_ADAPTER_T prAdapter); VOID nicRxSDIOReceiveRFBs(IN P_ADAPTER_T prAdapter); VOID nicRxSDIOAggReceiveRFBs(IN P_ADAPTER_T prAdapter); WLAN_STATUS nicRxSetupRFB(IN P_ADAPTER_T prAdapter, IN P_SW_RFB_T prSwRfb); VOID nicRxReturnRFB(IN P_ADAPTER_T prAdapter, IN P_SW_RFB_T prSwRfb); VOID nicProcessRxInterrupt(IN P_ADAPTER_T prAdapter); VOID nicRxUpdateCSUMStatistics(IN P_ADAPTER_T prAdapter, IN const ENUM_CSUM_RESULT_T aeCSUM[]); VOID nicRxQueryStatus(IN P_ADAPTER_T prAdapter, IN PUINT_8 pucBuffer, OUT PUINT_32 pu4Count); VOID nicRxClearStatistics(IN P_ADAPTER_T prAdapter); VOID nicRxQueryStatistics(IN P_ADAPTER_T prAdapter, IN PUINT_8 pucBuffer, OUT PUINT_32 pu4Count); VOID nicRxEnablePromiscuousMode(IN P_ADAPTER_T prAdapter); VOID nicRxDisablePromiscuousMode(IN P_ADAPTER_T prAdapter); WLAN_STATUS nicRxProcessActionFrame(IN P_ADAPTER_T prAdapter, IN P_SW_RFB_T prSwRfb);
d8a7f9710cc74f238558b745c56887dff35f8dea06735078a14a9031d47dcecf
402
mecwerks
spearmint-ios
code/cgame/cg_consolecmds.c
CG_TellAttacker_f
static void CG_TellAttacker_f( int localPlayerNum ) { int clientNum; char command[128]; char message[128]; clientNum = CG_LastAttacker( localPlayerNum ); if ( clientNum == -1 ) { return; } trap_Args( message, 128 ); Com_sprintf( command, 128, "%s %i %s", Com_LocalClientCvarName( localPlayerNum, "tell" ), clientNum, message ); trap_SendClientCommand( command ); }
void CG_TargetCommand_f( int localPlayerNum ); static void CG_SizeUp_f (void); static void CG_SizeDown_f (void); void CG_MessageMode_f( void ); void CG_MessageMode2_f( void ); void CG_MessageMode3_f( void ); void CG_MessageMode4_f( void ); static void CG_Viewpos_f( int localPlayerNum ); static void CG_ScoresDown_f(int localClientNum); static void CG_ScoresUp_f( int localClientNum ); void CG_SetModel_f( int localClientNum ); static void CG_LoadHud_f( void); static void CG_scrollScoresDown_f( void); static void CG_scrollScoresUp_f( void); static void CG_CameraOrbit( int speed, int delay ); static void CG_spWin_f( void); static void CG_spLose_f( void); static void CG_TellTarget_f( int localPlayerNum ); static void CG_VoiceTellTarget_f( int localPlayerNum ); static void CG_VoiceTellAttacker_f( int localPlayerNum ); static void CG_NextTeamMember_f( int localPlayerNum ); static void CG_PrevTeamMember_f( int localPlayerNum ); static void CG_NextOrder_f( int localPlayerNum ); static void CG_ConfirmOrder_f( int localPlayerNum ); static void CG_DenyOrder_f( int localPlayerNum ); static void CG_TaskOffense_f( int localPlayerNum ); static void CG_TaskDefense_f( int localPlayerNum ); static void CG_TaskPatrol_f( int localPlayerNum ); static void CG_TaskCamp_f( int localPlayerNum ); static void CG_TaskFollow_f( int localPlayerNum ); static void CG_TaskRetrieve_f( int localPlayerNum ); static void CG_TaskEscort_f( int localPlayerNum ); static void CG_TaskOwnFlag_f( int localPlayerNum ); static void CG_TauntKillInsult_f( int localPlayerNum ); static void CG_TauntPraise_f( int localPlayerNum ); static void CG_TauntTaunt_f( int localPlayerNum ); static void CG_TauntDeathInsult_f( int localPlayerNum ); static void CG_TauntGauntlet_f( int localPlayerNum ); static void CG_TaskSuicide_f( int localPlayerNum ); static void CG_StartOrbit_f( void ); void CG_GenerateTracemap(void); static void CG_RemapShader_f( void ); void CG_Play_f( void ); void CG_Music_f( void ); void CG_StopMusic_f( void ); void CG_StopCinematic_f( void ); void CG_Cinematic_f( void ); static qboolean CG_CheckCmdFlags( const char *cmd, int flags ); static qboolean CG_CheckCommands( consoleCommand_t *commands, int numCommands, const char *cmd ); qboolean CG_ConsoleCommand( int realTime ); void CG_InitConsoleCommands( void );
fcbab971aa06775d83ed1d33a71d6f70dba6f1c71a00c7bfded0542f02979b8d
379
ros2
ros2_embedded_riot
cpu/sam3x8e/periph/gpio.c
gpio_read
int gpio_read(gpio_t dev) { int res = -1; switch (dev) { #if GPIO_0_EN case GPIO_0: res = GPIO_0_DEV->PIO_PDSR & GPIO_0_PIN; #endif #if GPIO_1_EN case GPIO_1: res = GPIO_1_DEV->PIO_PDSR & GPIO_1_PIN; #endif #if GPIO_2_EN case GPIO_2: res = GPIO_2_DEV->PIO_PDSR & GPIO_2_PIN; #endif #if GPIO_3_EN case GPIO_3: res = GPIO_3_DEV->PIO_PDSR & GPIO_3_PIN; #endif #if GPIO_4_EN case GPIO_4: res = GPIO_4_DEV->PIO_PDSR & GPIO_4_PIN; #endif #if GPIO_5_EN case GPIO_5: res = GPIO_5_DEV->PIO_PDSR & GPIO_5_PIN; #endif #if GPIO_6_EN case GPIO_6: res = GPIO_6_DEV->PIO_PDSR & GPIO_6_PIN; #endif #if GPIO_7_EN case GPIO_7: res = GPIO_7_DEV->PIO_PDSR & GPIO_7_PIN; #endif #if GPIO_8_EN case GPIO_8: res = GPIO_8_DEV->PIO_PDSR & GPIO_8_PIN; #endif #if GPIO_9_EN case GPIO_9: res = GPIO_9_DEV->PIO_PDSR & GPIO_9_PIN; #endif #if GPIO_10_EN case GPIO_10: res = GPIO_10_DEV->PIO_PDSR & GPIO_10_PIN; #endif #if GPIO_11_EN case GPIO_11: res = GPIO_11_DEV->PIO_PDSR & GPIO_11_PIN; #endif #if GPIO_12_EN case GPIO_12: res = GPIO_12_DEV->PIO_PDSR & GPIO_12_PIN; #endif #if GPIO_13_EN case GPIO_13: res = GPIO_13_DEV->PIO_PDSR & GPIO_13_PIN; #endif #if GPIO_14_EN case GPIO_14: res = GPIO_14_DEV->PIO_PDSR & GPIO_14_PIN; #endif #if GPIO_15_EN case GPIO_15: res = GPIO_15_DEV->PIO_PDSR & GPIO_15_PIN; #endif } if (res < -1) { res = 1; } return res; }
int gpio_init_out(gpio_t dev, gpio_pp_t pushpull); int gpio_init_in(gpio_t dev, gpio_pp_t pushpull); int gpio_init_int(gpio_t dev, gpio_pp_t pullup, gpio_flank_t flank, gpio_cb_t cb, void *arg); void gpio_irq_enable(gpio_t dev); void gpio_irq_disable(gpio_t dev); void gpio_set(gpio_t dev); void gpio_clear(gpio_t dev); void gpio_toggle(gpio_t dev); void gpio_write(gpio_t dev, int value);
07b1c04f1aac7dc87cf2aaba1eaa954da8ec2a3e196c2eeb64e87b89fb0394fe
1,685
mpollmeier
claws-mail
src/common/utils.c
quote_cmd_argument
nt quote_cmd_argument(gchar * result, guint size, const gchar * path) { const gchar * p; gchar * result_p; guint remaining; result_p = result; remaining = size; for(p = path ; * p != '\0' ; p ++) { if (isalnum((guchar)*p) || (* p == '/')) { if (remaining > 0) { * result_p = * p; result_p ++; remaining --; } else { result[size - 1] = '\0'; return -1; } } else { if (remaining >= 2) { * result_p = '\\'; result_p ++; * result_p = * p; result_p ++; remaining -= 2; } else { result[size - 1] = '\0'; return -1; } } } if (remaining > 0) { * result_p = '\0'; } else { result[size - 1] = '\0'; return -1; } return 0; } t
gboolean superuser_p (void); gint g_chdir(const gchar *path); gint g_chmod(const gchar *path, gint mode); FILE* g_fopen(const gchar *filename, const gchar *mode); int g_open(const gchar *filename, int flags, int mode); gint mkstemp_name(gchar *template, gchar **name_used); gint mkstemp(gchar *template); void list_free_strings(GList *list); void slist_free_strings(GSList *list); static void hash_free_strings_func(gpointer key, gpointer value, gpointer data); void hash_free_strings(GHashTable *table); gint str_case_equal(gconstpointer v, gconstpointer v2); guint str_case_hash(gconstpointer key); void ptr_array_free_strings(GPtrArray *array); gboolean str_find(const gchar *haystack, const gchar *needle); gboolean str_case_find(const gchar *haystack, const gchar *needle); gint to_number(const gchar *nstr); gchar *itos_buf(gchar *nstr, gint n); gchar *itos(gint n); gchar *to_human_readable(goffset size); gint strcmp2(const gchar *s1, const gchar *s2); gchar *strstr2(const gchar *s1, const gchar *s2); gint path_cmp(const gchar *s1, const gchar *s2); gchar *strretchomp(gchar *str); gchar *strtailchomp(gchar *str, gchar tail_char); gchar *strcrchomp(gchar *str); gint file_strip_crs(const gchar *file); gchar *strcasestr(const gchar *haystack, const gchar *needle); gchar *strncpy2(gchar *dest, const gchar *src, size_t n); gboolean is_next_nonascii(const gchar *s); gint get_next_word_len(const gchar *s); static void trim_subject_for_compare(gchar *str); static void trim_subject_for_sort(gchar *str); gint subject_compare(const gchar *s1, const gchar *s2); gint subject_compare_for_sort(const gchar *s1, const gchar *s2); void trim_subject(gchar *str); void eliminate_parenthesis(gchar *str, gchar op, gchar cl); void extract_parenthesis(gchar *str, gchar op, gchar cl); void extract_quote(gchar *str, gchar quote_chr); void eliminate_address_comment(gchar *str); gchar *strchr_with_skip_quote(const gchar *str, gint quote_chr, gint c); void extract_address(gchar *str); void extract_list_id_str(gchar *str); static GSList *address_list_append_real(GSList *addr_list, const gchar *str, gboolean removecomments); GSList *address_list_append(GSList *addr_list, const gchar *str); GSList *address_list_append_with_comments(GSList *addr_list, const gchar *str); GSList *references_list_prepend(GSList *msgid_list, const gchar *str); GSList *references_list_append(GSList *msgid_list, const gchar *str); GSList *newsgroup_list_append(GSList *group_list, const gchar *str); GList *add_history(GList *list, const gchar *str); void remove_return(gchar *str); void remove_space(gchar *str); void unfold_line(gchar *str); void subst_char(gchar *str, gchar orig, gchar subst); void subst_chars(gchar *str, gchar *orig, gchar subst); void subst_for_filename(gchar *str); void subst_for_shellsafe_filename(gchar *str); gboolean is_ascii_str(const gchar *str); static const gchar * line_has_quote_char_last(const gchar * str, const gchar *quote_chars); gint get_quote_level(const gchar *str, const gchar *quote_chars); gint check_line_length(const gchar *str, gint max_chars, gint *line); const gchar * line_has_quote_char(const gchar * str, const gchar *quote_chars); static gchar *strstr_with_skip_quote(const gchar *haystack, const gchar *needle); gchar *get_abbrev_newsgroup_name(const gchar *group, gint len); gchar *trim_string(const gchar *str, gint len); GList *uri_list_extract_filenames(const gchar *uri_list); static gint axtoi(const gchar *hexstr); gboolean is_uri_string(const gchar *str); gchar *get_uri_path(const gchar *uri); gint get_uri_len(const gchar *str); void decode_uri_with_plus(gchar *decoded_uri, const gchar *encoded_uri, gboolean with_plus); void decode_uri(gchar *decoded_uri, const gchar *encoded_uri); static gchar *decode_uri_gdup(const gchar *encoded_uri); static char *w32_get_module_dir(void); const gchar *get_locale_dir(void); const gchar *get_home_dir(void); const gchar *get_rc_dir(void); void set_rc_dir(const gchar *dir); gboolean rc_dir_is_alt(void); const gchar *get_mail_base_dir(void); const gchar *get_news_cache_dir(void); const gchar *get_imap_cache_dir(void); const gchar *get_mime_tmp_dir(void); const gchar *get_template_dir(void); const gchar *get_cert_file(void); const gchar *get_desktop_file(void); const gchar *get_plugin_dir(void); const gchar *get_themes_dir(void); const gchar *get_tmp_dir(void); gchar *get_tmp_file(void); const gchar *get_domain_name(void); off_t get_file_size(const gchar *file); time_t get_file_mtime(const gchar *file); off_t get_file_size_as_crlf(const gchar *file); gboolean file_exist(const gchar *file, gboolean allow_fifo); gboolean is_relative_filename(const gchar *file); gboolean is_dir_exist(const gchar *dir); gboolean is_file_entry_exist(const gchar *file); gboolean dirent_is_regular_file(struct dirent *d); gint change_dir(const gchar *dir); gint make_dir(const gchar *dir); gint make_dir_hier(const gchar *dir); gint remove_all_files(const gchar *dir); gint remove_numbered_files(const gchar *dir, guint first, guint last); gint remove_numbered_files_not_in_list(const gchar *dir, GSList *numberlist); gint remove_all_numbered_files(const gchar *dir); gint remove_dir_recursive(const gchar *dir); gint rename_force(const gchar *oldpath, const gchar *newpath); gint append_file(const gchar *src, const gchar *dest, gboolean keep_backup); gint copy_file(const gchar *src, const gchar *dest, gboolean keep_backup); gint move_file(const gchar *src, const gchar *dest, gboolean overwrite); gint copy_file_part_to_fp(FILE *fp, off_t offset, size_t length, FILE *dest_fp); gint copy_file_part(FILE *fp, off_t offset, size_t length, const gchar *dest); gchar *canonicalize_str(const gchar *str); gint canonicalize_file(const gchar *src, const gchar *dest); gint canonicalize_file_replace(const gchar *file); gchar *normalize_newlines(const gchar *str); gchar *get_outgoing_rfc2822_str(FILE *fp); gchar *generate_mime_boundary(const gchar *prefix); gint change_file_mode_rw(FILE *fp, const gchar *file); FILE *my_tmpfile(void); FILE *get_tmpfile_in_dir(const gchar *dir, gchar **filename); FILE *str_open_as_stream(const gchar *str); gint str_write_to_file(const gchar *str, const gchar *file); static gchar *file_read_stream_to_str_full(FILE *fp, gboolean recode); static gchar *file_read_to_str_full(const gchar *file, gboolean recode); gchar *file_read_to_str(const gchar *file); gchar *file_read_stream_to_str(FILE *fp); gchar *file_read_to_str_no_recode(const gchar *file); gchar *file_read_stream_to_str_no_recode(FILE *fp); char *fgets_crlf(char *buf, int size, FILE *stream); static gint execute_async(gchar *const argv[]); static gint execute_sync(gchar *const argv[]); gint execute_command_line(const gchar *cmdline, gboolean async); gchar *get_command_output(const gchar *cmdline); static gint is_unchanged_uri_char(char c); static void encode_uri(gchar *encoded_uri, gint bufsize, const gchar *uri); gint open_uri(const gchar *uri, const gchar *cmdline); gint open_txt_editor(const gchar *filepath, const gchar *cmdline); time_t remote_tzoffset_sec(const gchar *zone); time_t tzoffset_sec(time_t *now); gchar *tzoffset(time_t *now); void get_rfc822_date(gchar *buf, gint len); void debug_set_mode(gboolean mode); gboolean debug_get_mode(void); void debug_print_real(const gchar *format, ...); const char * debug_srcname(const char *file); void * subject_table_lookup(GHashTable *subject_table, gchar * subject); void subject_table_remove(GHashTable *subject_table, gchar * subject); void utils_free_regex(void); int subject_get_prefix_length(const gchar *subject); tatic guint g_stricase_hash(gconstpointer gptr); tatic gint g_stricase_equal(gconstpointer gptr1, gconstpointer gptr2); int g_int_compare(gconstpointer a, gconstpointer b); char *generate_msgid(gchar *buf, gint len, gchar *user_addr); atic void g_node_map_recursive(GNode *node, gpointer data); ode *g_node_map(GNode *node, GNodeMapFunc func, gpointer data); oolean get_hex_value(guchar *out, gchar c1, gchar c2); id get_hex_str(gchar *out, guchar ch); ype g_auto_pointer_register(void); uto *g_auto_pointer_new(gpointer p); uto *g_auto_pointer_new_with_free(gpointer p, GFreeFunc free_); ointer g_auto_pointer_get_ptr(GAuto *auto_ptr); uto *g_auto_pointer_copy(GAuto *auto_ptr); id g_auto_pointer_free(GAuto *auto_ptr); id replace_returns(gchar *str); oolean get_uri_part(const gchar *start, const gchar *scanpos, const gchar **bp, const gchar **ep, gboolean hdr); har *make_uri_string(const gchar *bp, const gchar *ep); atic GHashTable *create_domain_tab(void); atic gboolean is_toplvl_domain(GHashTable *tab, const gchar *first, const gchar *last); oolean get_email_part(const gchar *start, const gchar *scanpos, const gchar **bp, const gchar **ep, gboolean hdr); har *make_email_string(const gchar *bp, const gchar *ep); har *make_http_string(const gchar *bp, const gchar *ep); atic gchar *mailcap_get_command_in_file(const gchar *path, const gchar *type, const gchar *file_to_open); har *mailcap_get_command_for_type(const gchar *type, const gchar *file_to_open); id mailcap_update_default(const gchar *type, const gchar *command); nt copy_dir(const gchar *src, const gchar *dst); oolean file_is_email (const gchar *filename); oolean sc_g_list_bigger(GList *list, gint max); oolean sc_g_slist_bigger(GSList *list, gint max); atic void init_time_names(void); ze_t fast_strftime(gchar *buf, gint buflen, const gchar *format, struct tm *lt); t claws_unlink(const gchar *filename);
ea17022d40f5f43f185a5d3e27449dfc3f484883d5b9cf9aeefb4effeb2de3df
721
jrtc27
libmatemixer
backends/oss/oss-switch.c
void oss_switch_class_init
static void oss_switch_class_init (OssSwitchClass *klass) { GObjectClass *object_class; MateMixerSwitchClass *switch_class; object_class = G_OBJECT_CLASS (klass); object_class->dispose = oss_switch_dispose; object_class->finalize = oss_switch_finalize; switch_class = MATE_MIXER_SWITCH_CLASS (klass); switch_class->set_active_option = oss_switch_set_active_option; switch_class->list_options = oss_switch_list_options; g_type_class_add_private (G_OBJECT_CLASS (klass), sizeof (OssSwitchPrivate)); }
b90eb50b034d8f138700c68041f18a9050d65812dc486e309523fdef87629922
552
voldien
snt
src/encryption.c
sntSymTotalBlockSize
unsigned int sntSymTotalBlockSize(unsigned int len, unsigned int blocksize){ if(len % blocksize == 0) return len; else return len + (blocksize - (len % blocksize)); }
void sntSSLPrintError(void); int sntASymGenerateKey(SNTConnection* connection, unsigned int cipher, unsigned int numbits); int sntASymCopyPublicKey(const SNTConnection* connection, void* cpkey); unsigned int sntASymGetBlockSize(unsigned int cipher, const void* key); void sntASymFree(SNTConnection* connection); static int sntGetSignHashEnum(unsigned int hash); int sntSymGenerateKey(SNTConnection* connection, unsigned int cipher); int sntSymCreateFromKey(SNTConnection* connection, unsigned int cipher, const void* pkey); void sntSymCopyKey(SNTConnection* connection, void** key); int sntSymKeyBitSize(unsigned int cipher); int sntSymKeyByteSize(unsigned int cipher); int sntSymBlockSize(unsigned int cipher); unsigned int sntSymNeedIV(unsigned int cipher); unsigned int sntSymdNeedFB(unsigned int cipher); void sntSymFree(SNTConnection* connection);
5d236deb025279a98de91aa5a5d9fbd398440c0df2c51ff13cff47b9a8c8c5d4
173
Michael-Pizzileo
sunxi-2.6.36
modules/wifi/apm/unifi-linux/lib_nme/nme/nme_core_fsm/nme_core_fsm.c
nme_core_wps_cancel_req
static void nme_core_wps_cancel_req( FsmContext* pContext, const FsmEvent* pReq) { const UnifiNmeWpsCancelReq_Evt* pWpsCancelReq = (UnifiNmeWpsCancelReq_Evt*)pReq; sme_trace_entry((TR_NME_CORE_FSM, "nme_core_wps_cancel_req()")); #if defined(CSR_WIFI_SECURITY_WPS_ENABLE) if (!nme_core_is_access_restricted(pContext, pWpsCancelReq->appHandle)) { FsmData *pFsmData = FSMDATA; if (pFsmData->wifiIsOn) { CsrUint16 wpsFsmInstance = nme_ntw_selector_get_wps_fsm_instance(pContext); if (FSM_TERMINATE != wpsFsmInstance) { fsm_forward_event(pContext, wpsFsmInstance, pReq); } else { call_unifi_nme_wps_cancel_cfm(pContext, pWpsCancelReq->appHandle, unifi_Success); } } else { call_unifi_nme_wps_cancel_cfm(pContext, pWpsCancelReq->appHandle, unifi_WifiOff); } } else { call_unifi_nme_wps_cancel_cfm(pContext, pWpsCancelReq->appHandle, unifi_Restricted); } #else call_unifi_nme_wps_cancel_cfm(pContext, pWpsCancelReq->appHandle, unifi_Unsupported); #endif }
static void nme_core_init_data(FsmContext* pContext); static void nme_core_init_fsm(FsmContext* pContext); static void nme_core_reset_fsm(FsmContext* pContext); NmeConfigData* nme_core_get_nme_config(FsmContext* pContext);
ee9ca5005299b2be600b767533983fb872541338ca63797b3c0296fc7deb6525
1,195
execunix
vinos
external/bsd/blacklist/bin/support.c
ssize_t hexdump
ssize_t hexdump(char *buf, size_t len, const char *str, const void *b, size_t l) { size_t z, cz; int r; const unsigned char *p = b; const unsigned char *e = p + l; r = snprintf(buf, len, "%s: ", str); if (r == -1) return -1; if ((cz = z = (size_t)r) >= len) cz = len; while (p < e) { r = snprintf(buf + cz, len - cz, "%.2x", *p++); if (r == -1) return -1; if ((cz = (z += (size_t)r)) >= len) cz = len; } return (ssize_t)z; }
static __attribute__((__format_arg__(3);
e6f8462802e2ebd4ba0d0990efa34305c5f2e294bfc93acdf7c3a01a0c8c0aa3
453
tizonia
tizonia-openmax-il
libtizonia/src/tizidle.c
* tiz_idle_class_init
void * tiz_idle_class_init (void * ap_tos, void * ap_hdl) { void * tizstate = tiz_get_type (ap_hdl, "tizstate"); void * tizidle_class = factory_new ( classOf (tizstate), "tizidle_class", classOf (tizstate), sizeof (tiz_idle_class_t), ap_tos, ap_hdl, ctor, idle_class_ctor, 0); return tizidle_class; }
82aa32a3364a50dd8121b12e78fa9300f19e15f1c165b38f4374de6aa0a03c4e
315
crobinso
libvirt
src/util/virdnsmasq.c
* addnhostsNew
static dnsmasqAddnHostsfile * addnhostsNew(const char *name, const char *config_dir) { dnsmasqAddnHostsfile *addnhostsfile; g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER; addnhostsfile = g_new0(dnsmasqAddnHostsfile, 1); addnhostsfile->hosts = NULL; addnhostsfile->nhosts = 0; virBufferAsprintf(&buf, "%s", config_dir); virBufferEscapeString(&buf, "/%s", name); virBufferAsprintf(&buf, ".%s", DNSMASQ_ADDNHOSTSFILE_SUFFIX); if (!(addnhostsfile->path = virBufferContentAndReset(&buf))) goto error; return addnhostsfile; error: addnhostsFree(addnhostsfile); return NULL; }
static int dnsmasqCapsOnceInit(void);
271668cee1f563c2dfad7e29b02aa631722f1fc6ecd426bf703a365f6174c2fd
647
0x1mason
GribApi.XP
grib_api/src/grib_accessor_class_variable.c
init_class
static void init_class(grib_accessor_class* c) { c->next_offset = (*(c->super))->next_offset; c->byte_offset = (*(c->super))->byte_offset; c->sub_section = (*(c->super))->sub_section; c->pack_missing = (*(c->super))->pack_missing; c->is_missing = (*(c->super))->is_missing; c->pack_string_array = (*(c->super))->pack_string_array; c->unpack_string_array = (*(c->super))->unpack_string_array; c->pack_bytes = (*(c->super))->pack_bytes; c->unpack_bytes = (*(c->super))->unpack_bytes; c->pack_expression = (*(c->super))->pack_expression; c->notify_change = (*(c->super))->notify_change; c->update_size = (*(c->super))->update_size; c->preferred_size = (*(c->super))->preferred_size; c->resize = (*(c->super))->resize; c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; c->next = (*(c->super))->next; c->unpack_double_element = (*(c->super))->unpack_double_element; c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; c->clear = (*(c->super))->clear; }
static void init(grib_accessor* a, const long length , grib_arguments* args ); void accessor_variable_set_type(grib_accessor* a,int type); static void dump(grib_accessor* a, grib_dumper* dumper); static int pack_double(grib_accessor* a, const double* val, size_t *len); static int pack_long(grib_accessor* a, const long* val, size_t *len); static int unpack_double(grib_accessor* a, double* val, size_t *len); static int unpack_long(grib_accessor* a, long* val, size_t *len); static int get_native_type(grib_accessor* a); static void destroy(grib_context* c,grib_accessor* a); static int unpack_string(grib_accessor* a, char* val, size_t *len); static int pack_string(grib_accessor* a, const char* val, size_t *len); static int value_count(grib_accessor* a,long* count); static size_t string_length(grib_accessor* a); static long byte_count(grib_accessor* a); static int compare(grib_accessor* a, grib_accessor* b); static grib_accessor* make_clone(grib_accessor* a,grib_section* s,int* err);
3e917c468163e6cbe9cf3a65305cbbd2c02a57255bd627e305de4ab821ff315b
997
NoThrills
a510_kernel
drivers/misc/stk2203.c
alscode2lux
inline int32_t alscode2lux(int32_t alscode) { #ifdef CONFIG_MACH_PICASSO_M if (acer_board_id == BOARD_PVT1) { if ((buff[1]-48) == 1) { if ((buff[6]-48) >= 2 && (buff[7]-48) >= 4) { alscode<<=11; } else if ((buff[6]-48) == 0 && (buff[7]-48) <= 5) { alscode<<=9; } else { alscode<<=10; } } else { alscode<<=10; } } else { alscode<<=9; } #elif defined(CONFIG_MACH_PICASSO_MF) if ((buff[1]-48) == 1 && (buff[6]-48) >= 2 && (buff[7]-48) >= 4) { alscode<<=11; } else if ((buff[1]-48) == 1 && (buff[6]-48) == 0 && (buff[7]-48) <= 5) { alscode<<=9; } else { alscode<<=10; } #else alscode<<=10; #endif return alscode/als_transmittance; }
inline void report_event(struct input_dev* dev,int32_t report_value); inline int32_t get_reading(void); static int32_t get_lux(); static int32_t set_it(uint32_t it); static int32_t set_gain(uint32_t gain); static int32_t set_power_state(uint32_t nShutdown); static int32_t enable_als(uint32_t enable); static int32_t init_all_setting(); static ssize_t lux_range_show(struct kobject * kobj, struct kobj_attribute * attr, char * buf); static ssize_t als_enable_show(struct kobject * kobj, struct kobj_attribute * attr, char * buf); static ssize_t lux_show(struct kobject * kobj, struct kobj_attribute * attr, char * buf); static ssize_t lux_res_show(struct kobject * kobj, struct kobj_attribute * attr, char * buf); ssize_t stk_bin_sysfs_read(als_lux_range); ssize_t stk_bin_sysfs_read(als_lux_resolution); ssize_t stk_bin_sysfs_read(lux_bin); ssize_t stk_bin_sysfs_read(als_enable); ssize_t stk_bin_sysfs_write(als_enable); ssize_t stk_bin_sysfs_read(als_min_delay); static int stk_sysfs_create_files(struct kobject *kobj,struct attribute** attrs); static void stk_oss_wq_function(struct work_struct *work); static irqreturn_t stk_oss_irq_handler(int irq, void *data); static int stk_als_remove(struct i2c_client *client); static int __init stk_i2c_als_init(void); static void __exit stk_i2c_als_exit(void);
aca17c674c92a7b8781e177b95e771b4d1f95aa3dc52bc1757db18a59792dc62
679
cdleonard
systemtap
runtime/sym.c
_stp_umodule_relocate
static unsigned long _stp_umodule_relocate(const char *path, unsigned long offset, struct task_struct *tsk) { unsigned i; unsigned long vm_start = 0; dbug_sym(1, "[%d] %s, %lx\n", tsk->pid, path, offset); for (i = 0; i < _stp_num_modules; i++) { struct _stp_module *m = _stp_modules[i]; if (strcmp(path, m->path) || m->num_sections != 1) continue; if (!strcmp(m->sections[0].name, ".absolute")) return offset; if (strcmp(m->sections[0].name, ".dynamic")) continue; if (stap_find_vma_map_info_user(tsk->group_leader, m, &vm_start, NULL, NULL) == 0) { offset += vm_start; dbug_sym(1, "address=%lx\n", offset); return offset; } } return 0; }
unsigned long _stp_linenumber_lookup(unsigned long addr, struct task_struct *task, char ** filename, int need_filename); static int _stp_module_check(void); static int _stp_kmodule_check (const char *name); static int _stp_usermodule_check(struct task_struct *tsk, const char *path_name, unsigned long addr); unsigned long kallsyms_lookup_name (const char *name);
7844d104264219b7d3fd8fc4873f687fb17146703be4f9813cafd3a5dfeaed88
749
qingdear
lemax
drivers/media/platform/msm/camera_v2/sensor/ois/OisIni_OFILM.c
mAccFixMod_OFILM
mAccFixMod_OFILM( unsigned char UcAccMod_OFILM ) { switch ( UcAccMod_OFILM ) { case OFF_OFILM : RegWriteA_Ofilm( WC_RAMACCMOD_OFILM, 0x00 ) ; break ; case ON_OFILM : RegWriteA_Ofilm( WC_RAMACCMOD_OFILM, 0x31 ) ; break ; } }
void IniSet_OFILM( void ); void IniSetAf_OFILM( void ); void IniClk_OFILM( void ); void IniIop_OFILM( void ); void IniDgy_OFILM( void ); void IniMon_OFILM( void ); void IniSrv_OFILM( void ); void IniGyr_OFILM( void ); iFil_OFILM( void ); iAdj_OFILM( void ); iCmd_OFILM( void ); yWit_OFILM( unsigned short UsTrgAdr_OFILM, unsigned char UcTrgDat_OFILM ); mClr_OFILM( unsigned char *NcTgtPtr_OFILM, unsigned short UsClrSiz_OFILM ); tTim_Ofilm( unsigned short UsWitTim_Ofilm ); OutSignal_OFILM( void ); OutSignalCont_OFILM( void ); cWit_OFILM( unsigned char UcTrgDat_OFILM ); lectGySleep_OFILM( unsigned char UcSelMode_OFILM ); toGainControlSw_OFILM( unsigned char UcModeSw_OFILM ); rGyr_OFILM( unsigned short UsClrFil_OFILM , unsigned char UcClrMod_OFILM ); vSw_OFILM( unsigned char UcDrvSw_OFILM ); DrvSw_OFILM( unsigned char UcDrvSw_OFILM ); iAf_OFILM( void ); iPtAve_OFILM( void ); iPtMovMod_OFILM( unsigned char UcPtMod_OFILM ); kCvr_OFILM( void );
4a86182acc2a0091797c4b2ce83c9e35142e9fe5c8c682e4707d7c1ec25c1ac9
251
P4N74
radare2
libr/util/strpool.c
r_strpool_free
R_API void r_strpool_free (RStrpool *p) { free (p->str); free (p); }
R_API RStrpool* r_strpool_new (int sz); R_API char *r_strpool_empty (RStrpool *p); R_API char *r_strpool_alloc (RStrpool *p, int l); R_API int r_strpool_memcat(RStrpool *p, const char *s, int len); R_API int r_strpool_append(RStrpool *p, const char *s); R_API int r_strpool_ansi_chop(RStrpool *p, int n); R_API int r_strpool_fit(RStrpool *p); R_API char *r_strpool_get(RStrpool *p, int index); R_API char *r_strpool_get_i(RStrpool *p, int index); R_API int r_strpool_get_index(RStrpool *p, const char *s); R_API char *r_strpool_next(RStrpool *p, int index); R_API char *r_strpool_slice (RStrpool *p, int index); int main();
9ace1a78d7e80276628c6d3dee3de74450a364d0d40b6889a7533932ed9f309c
71
dr-who
stutools
spit/testpositions.c
main
int main() { positionContainer pc; positionContainerInit(&pc, 0); positionContainerSetup(&pc, 1); positionContainerInfo(&pc); positionContainerFree(&pc); positionContainerSetup(&pc, 1000); positionContainerInfo(&pc); positionContainerFree(&pc); size_t num = 10000; positionContainerSetup(&pc, num); positionContainerCreatePositions(&pc, 0, 1, 0, 0.0, 4096, 8192, 4096, 0, 0, 10000*10000, 42, 1, 0); positionContainerInfo(&pc); positionContainerDump(&pc, 10); positionContainerCheck(&pc, 0, 10000*10000, 0); positionContainerInfo(&pc); positionContainer pc2 = positionContainerMultiply(&pc, 2); positionContainerInfo(&pc2); positionContainerFree(&pc); positionContainer pc3 = positionContainerMultiply(&pc2, 4); positionContainerInfo(&pc3); positionContainerFree(&pc2); positionContainerJumble(&pc3, 1); positionContainerInfo(&pc3); positionContainerCheck(&pc3, 0, pc3.maxbdSize, 0); positionContainerDump(&pc3, 10); for (size_t i = 0; i < pc3.sz; i++) { pc3.positions[i].finishTime = 1; } char *tmp = malloc(100); sprintf(tmp,"testfileXXXXXX"); int ret = mkstemp(tmp); fprintf(stderr,"ret %d\n", ret); fprintf(stderr,"temp: %s\n", tmp); positionContainerSave(&pc3, tmp, 10000*10000, 0, NULL); positionContainerInfo(&pc3); positionContainerCollapse(&pc3); positionContainerInfo(&pc3); positionContainerDump(&pc3, 10); positionContainerFree(&pc3); positionContainerInfo(&pc3); deleteFile(tmp); free(tmp); return 0; }
2faf1db10be028b3ce52039210392a3a1183523e8e78b4fbf28fd9b14182bce0
1,528
AndreyPopovNew
asuswrt-merlin-rt-n
release/src/router/uqmi/commands.c
cmd_version_cb
static void cmd_version_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg) { struct qmi_ctl_get_version_info_response res; char name_buf[16]; int i; qmi_parse_ctl_get_version_info_response(msg, &res); for (i = 0; i < res.data.service_list_n; i++) { sprintf(name_buf, "service_%d", res.data.service_list[i].service); blobmsg_printf(&status, name_buf, "%d,%d", res.data.service_list[i].major_version, res.data.service_list[i].minor_version); } }
static void no_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg); void uqmi_add_command(char *arg, int cmd); static void uqmi_print_result(struct blob_attr *data); static bool __uqmi_run_commands(struct qmi_dev *qmi, bool option); bool uqmi_run_commands(struct qmi_dev *qmi);
be8e5ec17629a1ea0227161890995cb67c896a88eb6f5cb9f5a3210d0a98e42d
480
media-explorer
media-explorer
mex/mex-utils.c
void instance_destroyed_cb
ic void instance_destroyed_cb (gpointer ctx_, GObject *where_the_instance_was) { WeakHandlerCtx *ctx = ctx_; g_object_weak_unref (ctx->observer, observer_destroyed_cb, ctx); g_closure_remove_invalidate_notifier (ctx->closure, ctx, closure_invalidated_cb); whc_free (ctx); } /*
mex_style_load_default (void); mex_push_focus (MxFocusable *actor); mex_action_set_content (MxAction *action, MexContent *content); ontent * mex_action_get_content (MxAction *action); mex_action_set_context (MxAction *action, MexModel *model); odel * mex_action_get_context (MxAction *action); ic gchar * mex_utils_content_get_title (MexContent *content, gboolean *allocated); r * mex_date_to_string (GDateTime *date); rk mex_tile_shadow_quark (void); t char* mex_get_data_dir (void); lean mex_actor_has_focus (ClutterActor *actor); ontent * mex_content_from_uri (const gchar *uri); File * mex_get_settings_key_file (void); ic void whc_free (WeakHandlerCtx *ctx);
ec3949f3bb4bc4c8c1b7ef0ea8b1965ac12291c845e3119da1e3ee466da3bf9a
301
butkevicius
motorola-moto-z-permissive-kernel
drivers/gpu/msm/adreno_drawctxt.c
adreno_drawctxt_switch
int adreno_drawctxt_switch(struct adreno_device *adreno_dev, struct adreno_ringbuffer *rb, struct adreno_context *drawctxt, unsigned int flags) { struct kgsl_device *device = KGSL_DEVICE(adreno_dev); struct kgsl_pagetable *new_pt; int ret = 0; BUG_ON(!rb); if (rb->drawctxt_active == drawctxt) return ret; if (drawctxt != NULL && kgsl_context_detached(&drawctxt->base)) return -ENOENT; trace_adreno_drawctxt_switch(rb, drawctxt, flags); if (drawctxt) { if (!_kgsl_context_get(&drawctxt->base)) return -ENOENT; new_pt = drawctxt->base.proc_priv->pagetable; } else { new_pt = device->mmu.defaultpagetable; } ret = adreno_ringbuffer_set_pt_ctx(rb, new_pt, drawctxt); if (ret) { KGSL_DRV_ERR(device, "Failed to set pagetable on rb %d\n", rb->id); return ret; } if (rb->drawctxt_active) kgsl_context_put(&rb->drawctxt_active->base); rb->drawctxt_active = drawctxt; return 0; }
static inline void _set_context_priority(struct adreno_context *drawctxt); void adreno_drawctxt_detach(struct kgsl_context *context); void adreno_drawctxt_destroy(struct kgsl_context *context);
250bdaff259989e260eb8f79518783ac1b0e51623029cde593c454466ed4c0c1
952
ArcticaProject
vcxsrv
mesalib/src/glsl/nir/nir_to_ssa.c
void rewrite_block
static void rewrite_block(nir_block *block, rewrite_state *state) { nir_foreach_instr_safe(block, instr) { rewrite_instr_forward(instr, state); } if (block != state->impl->end_block && !nir_cf_node_is_last(&block->cf_node) && nir_cf_node_next(&block->cf_node)->type == nir_cf_node_if) { nir_if *if_stmt = nir_cf_node_as_if(nir_cf_node_next(&block->cf_node)); state->parent_instr = NULL; state->parent_if = if_stmt; rewrite_use(&if_stmt->condition, state); } if (block->successors[0]) rewrite_phi_sources(block->successors[0], block, state); if (block->successors[1]) rewrite_phi_sources(block->successors[1], block, state); for (unsigned i = 0; i < block->num_dom_children; i++) rewrite_block(block->dom_children[i], state); nir_foreach_instr_reverse(block, instr) { rewrite_instr_backwards(instr, state); } }
static void insert_trivial_phi(nir_register *reg, nir_block *block, void *mem_ctx); static void insert_phi_nodes(nir_function_impl *impl); static nir_ssa_def *get_ssa_src(nir_register *reg, rewrite_state *state); static bool rewrite_use(nir_src *src, void *_state); static bool rewrite_def_forwards(nir_dest *dest, void *_state); static void rewrite_alu_instr_forward(nir_alu_instr *instr, rewrite_state *state); static void rewrite_phi_instr(nir_phi_instr *instr, rewrite_state *state); static void rewrite_instr_forward(nir_instr *instr, rewrite_state *state); static void rewrite_phi_sources(nir_block *block, nir_block *pred, rewrite_state *state); static bool rewrite_def_backwards(nir_dest *dest, void *_state); static void rewrite_instr_backwards(nir_instr *instr, rewrite_state *state); static void remove_unused_regs(nir_function_impl *impl, rewrite_state *state); static void init_rewrite_state(nir_function_impl *impl, rewrite_state *state); static void destroy_rewrite_state(rewrite_state *state); void nir_convert_to_ssa_impl(nir_function_impl *impl); void nir_convert_to_ssa(nir_shader *shader);
fbae36d602022e78fd8e039d2271782fe84a1fab90b72fae6023cd84848d372a
914
Chalearm
MachineLearning-
mProject/library_jui/listMatrix.c
makeEmptyVfloat
void makeEmptyVfloat(list_v_float* alist) { alist->currentNode = alist->firstNode; node_v_float *p = NULL; while(alist->numOfNode--) { p = alist->currentNode; alist->currentNode = alist->currentNode->next; delete_vector_float(&p->element); free(p); } alist->firstNode = NULL; alist->lastNode = NULL; alist->currentNode = NULL; }
void constructListVint(list_v_int* alist); void constructListVchar(list_v_char* alist); void constructListVfloat(list_v_float* alist); void constructListVdouble(list_v_double* alist); void constructListMint(list_m_int* alist); void constructListMchar(list_m_char* alist); void constructListMfloat(list_m_float* alist); void constructListMdouble(list_m_double* alist); void addNodeVint(list_v_int* alist,vector_int* dat); void addNodeVchar(list_v_char* alist,vector_char* dat); void addNodeVfloat(list_v_float* alist,vector_float* dat); void addNodeVdouble(list_v_double* alist,vector_double* dat); void addNodeMint(list_m_int* alist,matrix_int* dat); void addNodeMchar(list_m_char* alist,matrix_char* dat); void addNodeMfloat(list_m_float* alist,matrix_float* dat); void addNodeMdouble(list_m_double* alist,matrix_double* dat); int searchListVint(list_v_int* alist,vector_int* dat); int searchListVchar(list_v_char* alist,vector_char* dat); int searchListVfloat(list_v_float* alist,vector_float* dat); int searchListVdouble(list_v_double* alist,vector_double* dat); int searchListMint(list_m_int* alist,matrix_int* dat); int searchListMchar(list_m_char* alist,matrix_char* dat); int searchListMfloat(list_m_float* alist,matrix_float* dat); int searchListMdouble(list_m_double* alist,matrix_double* dat); void addNodeUniqueVint(list_v_int* alist,vector_int* dat); void addNodeUniqueVchar(list_v_char* alist,vector_char* dat); void addNodeUniqueVfloat(list_v_float* alist,vector_float* dat); void addNodeUniqueVdouble(list_v_double* alist,vector_double* dat); void addNodeUniqueMint(list_m_int* alist,matrix_int* dat); void addNodeUniqueMchar(list_m_char* alist,matrix_char* dat); void addNodeUniqueMfloat(list_m_float* alist,matrix_float* dat); void addNodeUniqueMdouble(list_m_double* alist,matrix_double* dat); void makeEmptyVint(list_v_int* alist); void makeEmptyVchar(list_v_char* alist); void makeEmptyVdouble(list_v_double* alist); void makeEmptyMint(list_m_int* alist); void makeEmptyMchar(list_m_char* alist); void makeEmptyMfloat(list_m_float* alist); void makeEmptyMdouble(list_m_double* alist); void destructorListVint(list_v_int* alist); void destructorListVchar(list_v_char* alist); void destructorListVfloat(list_v_float* alist); void destructorListVdouble(list_v_double* alist); void destructorListMint(list_m_int* alist); void destructorListMchar(list_m_char* alist); void destructorListMfloat(list_m_float* alist); void destructorListMdouble(list_m_double* alist); void deleteNodeVintByOreder(list_v_int* alist,int ord); void deleteNodeVcharByOreder(list_v_char* alist,int ord); void deleteNodeVfloatByOreder(list_v_float* alist,int ord); void deleteNodeVdoubleByOreder(list_v_double* alist,int ord); void deleteNodeMintByOreder(list_m_int* alist,int ord); void deleteNodeMcharByOreder(list_m_char* alist,int ord); void deleteNodeMfloatByOreder(list_m_float* alist,int ord); void deleteNodeMdoubleByOreder(list_m_double* alist,int ord); void deleteNodeVintByElement(list_v_int* alist,vector_int* dat); void deleteNodeVcharByElement(list_v_char* alist,vector_char* dat); void deleteNodeVfloatByElement(list_v_float* alist,vector_float* dat); void deleteNodeVdoubleByElement(list_v_double* alist,vector_double* dat); void deleteNodeMintByElement(list_m_int* alist,matrix_int* dat); void deleteNodeMcharByElement(list_m_char* alist,matrix_char* dat); void deleteNodeMfloatByElement(list_m_float* alist,matrix_float* dat); void deleteNodeMdoubleByElement(list_m_double* alist,matrix_double* dat); vector_int getValueVint(list_v_int* alist,int index); vector_char getValueVchar(list_v_char* alist,int index); vector_float getValueVfloat(list_v_float* alist,int index); vector_double getValueVdouble(list_v_double* alist,int index); matrix_int getValueMint(list_m_int* alist,int index); matrix_char getValueMchar(list_m_char* alist,int index); matrix_float getValueMfloat(list_m_float* alist,int index); matrix_double getValueMdouble(list_m_double* alist,int index); matrix_int listVint2Matrix(list_v_int* alist); matrix_char listVchar2Matrix(list_v_char* alist); matrix_float listVfloat2Matrix(list_v_float* alist); matrix_double listVdouble2Matrix(list_v_double* alist); void printListVint(list_v_int* alist,int opt); void printListVchar(list_v_char* alist,int opt); void printListVfloat(list_v_float* alist,int opt); void printListVdouble(list_v_double* alist,int opt); void printListMint(list_m_int* alist,int opt); void printListMchar(list_m_char* alist,int opt); void printListMfloat(list_m_float* alist,int opt); void printListMdouble(list_m_double* alist,int opt);
c5acabb523fee88ed5c9cb48983aa97229ccf06c71fc0e3e5708f9fc1787a6b3
423
lkl
lkl-win-fsd
src/util.c
VcbListDel
VOID VcbListDel(VCB_LIST *l, struct _LKL_VCB *vcb) { ExAcquireResourceExclusiveLite(&l->rwlock, TRUE); RemoveEntryList(&vcb->next); ExReleaseResourceLite(&l->rwlock); }
NTSTATUS VcbListInit(VCB_LIST *l); VOID VcbListAdd(VCB_LIST *l, struct _LKL_VCB *vcb); NTSTATUS VcbListFini(VCB_LIST *l); VOID Stop(VOID); ULONG GetProcessNameOffset(VOID); PCHAR GetCurrentProcessName();
f7b087ca2afb0e8ebd230a33242b374c56cdeb97a4da1a84e4dfd350c0c3fee1
172
axelmuhr
Helios-NG
cmds/public/IV2.5/src/libInterViews/textbuffer.c
TextBuffer::Match
int TextBuffer::Match (Regexp* regexp, int index, int stop) { int s = limit(0, stop, length); int i = limit(0, index, s); return regexp->Match(text, length, i); }
inline int limit (int l, int x, int h); int TextBuffer::Search (Regexp* regexp, int index, int range, int stop); int TextBuffer::BackwardSearch (Regexp* regexp, int index); int TextBuffer::ForwardSearch (Regexp* regexp, int index); boolean TextBuffer::BackwardMatch (Regexp* regexp, int index); boolean TextBuffer::ForwardMatch (Regexp* regexp, int index); int TextBuffer::Insert (int index, const char* string, int count); int TextBuffer::Delete (int index, int count); int TextBuffer::Copy (int index, char* buffer, int count); int TextBuffer::Width (); int TextBuffer::LineIndex(int line); int TextBuffer::LinesBetween (int index1, int index2); int TextBuffer::LineNumber (int index); int TextBuffer::LineOffset (int index); boolean TextBuffer::IsBeginningOfLine (int index); int TextBuffer::BeginningOfLine (int index); int TextBuffer::BeginningOfNextLine (int index); boolean TextBuffer::IsEndOfLine (int index); int TextBuffer::EndOfLine (int index); int TextBuffer::EndOfPreviousLine (int index); boolean TextBuffer::IsBeginningOfWord (int index); int TextBuffer::BeginningOfWord (int index); int TextBuffer::BeginningOfNextWord (int index); boolean TextBuffer::IsEndOfWord (int index); int TextBuffer::EndOfWord (int index); int TextBuffer::EndOfPreviousWord (int index);
a83475ad31867bd7c39edaf08780392a477a74eeac760ad0858223b15d39e54e
175
AltraMayor
XIA-for-Linux
drivers/base/property.c
fwnode_property_read_string_array
int fwnode_property_read_string_array(struct fwnode_handle *fwnode, const char *propname, const char **val, size_t nval) { int ret; ret = __fwnode_property_read_string_array(fwnode, propname, val, nval); if (ret == -EINVAL && fwnode && fwnode->secondary) ret = __fwnode_property_read_string_array(fwnode->secondary, propname, val, nval); return ret; }
static inline bool is_pset_node(struct fwnode_handle *fwnode); static inline struct property_set *to_pset_node(struct fwnode_handle *fwnode); static inline struct fwnode_handle *dev_fwnode(struct device *dev); bool device_property_present(struct device *dev, const char *propname); bool fwnode_property_present(struct fwnode_handle *fwnode, const char *propname); static void pset_free_set(struct property_set *pset); static struct property_set *pset_copy_set(const struct property_set *pset); void device_remove_property_set(struct device *dev); int device_add_property_set(struct device *dev, const struct property_set *pset); void fwnode_handle_put(struct fwnode_handle *fwnode); unsigned int device_get_child_node_count(struct device *dev); bool device_dma_supported(struct device *dev); enum dev_dma_attr device_get_dma_attr(struct device *dev); int device_get_phy_mode(struct device *dev); void *device_get_mac_address(struct device *dev, char *addr, int alen);
048a1816d71fa780d5554ab40f755c0258d818f13648dd8591d191fb5b6dad32
388
leemgs
OptimusOneKernel-KandroidCommunity
drivers/media/video/pvrusb2/pvrusb2-context.c
pvr2_context_check
static void pvr2_context_check(struct pvr2_context *mp) { struct pvr2_channel *ch1, *ch2; pvr2_trace(PVR2_TRACE_CTXT, "pvr2_context %p (notify)", mp); if (!mp->initialized_flag && !mp->disconnect_flag) { mp->initialized_flag = !0; pvr2_trace(PVR2_TRACE_CTXT, "pvr2_context %p (initialize)", mp); if (pvr2_hdw_initialize(mp->hdw, (void (*)(void *))pvr2_context_notify, mp)) { mp->video_stream.stream = pvr2_hdw_get_video_stream(mp->hdw); if (mp->setup_func) mp->setup_func(mp); } else { pvr2_trace(PVR2_TRACE_CTXT, "pvr2_context %p (thread skipping setup)", mp); } } for (ch1 = mp->mc_first; ch1; ch1 = ch2) { ch2 = ch1->mc_next; if (ch1->check_func) ch1->check_func(ch1); } if (mp->disconnect_flag && !mp->mc_first) { pvr2_context_destroy(mp); return; } }
static void pvr2_context_set_notify(struct pvr2_context *mp, int fl); static void pvr2_context_destroy(struct pvr2_context *mp); static void pvr2_context_notify(struct pvr2_context *mp); static int pvr2_context_shutok(void); static int pvr2_context_thread_func(void *foo); int pvr2_context_global_init(void); void pvr2_context_global_done(void); static void pvr2_context_reset_input_limits(struct pvr2_context *mp); static void pvr2_context_enter(struct pvr2_context *mp); static void pvr2_context_exit(struct pvr2_context *mp); void pvr2_context_disconnect(struct pvr2_context *mp); void pvr2_channel_init(struct pvr2_channel *cp,struct pvr2_context *mp); static void pvr2_channel_disclaim_stream(struct pvr2_channel *cp); void pvr2_channel_done(struct pvr2_channel *cp); int pvr2_channel_limit_inputs(struct pvr2_channel *cp,unsigned int cmsk); unsigned int pvr2_channel_get_limited_inputs(struct pvr2_channel *cp);
faa5f9cbe7dfec59c905c706ff5cded4e226261cb0be3e2dc300eabb2b75d17d
846
UnaPlugin
modified-Tess-two-with-modified-Android.mk-
com_googlecode_leptonica_android/src/src/pdfio2.c
l_int32 generateContentStringPdf
static l_int32 generateContentStringPdf(L_PDF_DATA *lpd) { char *buf; char *cstr; l_int32 i, bufsize; l_float32 xpt, ypt, wpt, hpt; SARRAY *sa; PROCNAME("generateContentStringPdf"); bufsize = 1000 + 200 * lpd->n; if ((buf = (char *)LEPT_CALLOC(bufsize, sizeof(char))) == NULL) return ERROR_INT("calloc fail for buf", procName, 1); sa = sarrayCreate(lpd->n); for (i = 0; i < lpd->n; i++) { ptaGetPt(lpd->xy, i, &xpt, &ypt); ptaGetPt(lpd->wh, i, &wpt, &hpt); snprintf(buf, bufsize, "q %.4f %.4f %.4f %.4f %.4f %.4f cm /Im%d Do Q\n", wpt, 0.0, 0.0, hpt, xpt, ypt, i + 1); sarrayAddString(sa, buf, L_COPY); } cstr = sarrayToString(sa, 0); sarrayDestroy(&sa); if (!cstr) { LEPT_FREE(buf); return ERROR_INT("cstr not made", procName, 1); } snprintf(buf, bufsize, "5 0 obj\n" "<< /Length %d >>\n" "stream\n" "%s" "endstream\n" "endobj\n", (l_int32)strlen(cstr), cstr); lpd->obj5 = stringNew(buf); l_dnaAddNumber(lpd->objsize, strlen(lpd->obj5)); sarrayDestroy(&sa); LEPT_FREE(buf); LEPT_FREE(cstr); return 0; }
6d63fd746de04fdd70c2834f186deaa1d302c8b6e0fd715ad95bc9ff2db2d119
1,347
ffolkes
android_kernel_samsung_smdk4412
kernel/sched.c
prepare_calc_load
void prepare_calc_load(void) { long delta; if (time_before(jiffies, calc_mask_update - 10)) return; clear_all_cpu_load_update_mask(); atomic_long_xchg(&calc_unmask_cpu_load_idle, 0); delta = calc_load_fold_idle(); if (delta) atomic_long_add(delta, &calc_load_tasks); calc_mask_update += LOAD_FREQ; }
static inline int rt_policy(int policy); static inline int task_has_rt_policy(struct task_struct *p); static enum hrtimer_restart sched_rt_period_timer(struct hrtimer *timer); static inline int rt_bandwidth_enabled(void); static void start_rt_bandwidth(struct rt_bandwidth *rt_b); static void destroy_rt_bandwidth(struct rt_bandwidth *rt_b); static inline int cpu_of(struct rq *rq); static inline struct task_group *task_group(struct task_struct *p); static inline bool task_notify_on_migrate(struct task_struct *p); static inline void set_task_rq(struct task_struct *p, unsigned int cpu); static inline struct task_group *task_group(struct task_struct *p); static inline bool task_notify_on_migrate(struct task_struct *p); static void update_rq_clock(struct rq *rq); int runqueue_is_locked(int cpu); static int sched_feat_show(struct seq_file *m, void *v); static int sched_feat_open(struct inode *inode, struct file *filp); static __init int sched_init_debug(void); static inline u64 global_rt_period(void); static inline u64 global_rt_runtime(void); static inline int task_current(struct rq *rq, struct task_struct *p); static inline int task_running(struct rq *rq, struct task_struct *p); static inline void prepare_lock_switch(struct rq *rq, struct task_struct *next); static inline void finish_lock_switch(struct rq *rq, struct task_struct *prev); static inline void prepare_lock_switch(struct rq *rq, struct task_struct *next); static inline void finish_lock_switch(struct rq *rq, struct task_struct *prev); static inline int hrtick_enabled(struct rq *rq); static void hrtick_clear(struct rq *rq); static enum hrtimer_restart hrtick(struct hrtimer *timer); static void __hrtick_start(void *arg); static void hrtick_start(struct rq *rq, u64 delay); static __init void init_hrtick(void); static void hrtick_start(struct rq *rq, u64 delay); static inline void init_hrtick(void); static void init_rq_hrtick(struct rq *rq); static inline void hrtick_clear(struct rq *rq); static inline void init_rq_hrtick(struct rq *rq); static inline void init_hrtick(void); static void resched_task(struct task_struct *p); static void resched_cpu(int cpu); void force_cpu_resched(int cpu); int get_nohz_timer_target(void); void wake_up_idle_cpu(int cpu); static u64 sched_avg_period(void); static void sched_avg_update(struct rq *rq); static void sched_rt_avg_update(struct rq *rq, u64 rt_delta); static void resched_task(struct task_struct *p); static void sched_rt_avg_update(struct rq *rq, u64 rt_delta); static void sched_avg_update(struct rq *rq); void force_cpu_resched(int cpu); static inline void update_load_add(struct load_weight *lw, unsigned long inc); static inline void update_load_sub(struct load_weight *lw, unsigned long dec); static inline void update_load_set(struct load_weight *lw, unsigned long w); static inline void inc_cpu_load(struct rq *rq, unsigned long load); static inline void dec_cpu_load(struct rq *rq, unsigned long load); static int walk_tg_tree(tg_visitor down, tg_visitor up, void *data); static int tg_nop(struct task_group *tg, void *data); static unsigned long weighted_cpuload(const int cpu); static unsigned long source_load(int cpu, int type); static unsigned long target_load(int cpu, int type); static unsigned long power_of(int cpu); static unsigned long cpu_avg_load_per_task(int cpu); static int tg_load_down(struct task_group *tg, void *data); static void update_h_load(long cpu); static int double_lock_balance(struct rq *this_rq, struct rq *busiest); static inline void __set_task_cpu(struct task_struct *p, unsigned int cpu); static inline unsigned int do_avg_nr_running(struct rq *rq); static void inc_nr_running(struct rq *rq); static void dec_nr_running(struct rq *rq); static void set_load_weight(struct task_struct *p); static void enqueue_task(struct rq *rq, struct task_struct *p, int flags); static void dequeue_task(struct rq *rq, struct task_struct *p, int flags); static void activate_task(struct rq *rq, struct task_struct *p, int flags); static void deactivate_task(struct rq *rq, struct task_struct *p, int flags); void enable_sched_clock_irqtime(void); void disable_sched_clock_irqtime(void); static inline void irq_time_write_begin(void); static inline void irq_time_write_end(void); static inline u64 irq_time_read(int cpu); static inline void irq_time_write_begin(void); static inline void irq_time_write_end(void); static inline u64 irq_time_read(int cpu); void account_system_vtime(struct task_struct *curr); static void update_rq_clock_task(struct rq *rq, s64 delta); static int irqtime_account_hi_update(void); static int irqtime_account_si_update(void); static void update_rq_clock_task(struct rq *rq, s64 delta); void sched_set_stop_task(int cpu, struct task_struct *stop); static inline int __normal_prio(struct task_struct *p); static inline int normal_prio(struct task_struct *p); static int effective_prio(struct task_struct *p); inline int task_curr(const struct task_struct *p); static void check_preempt_curr(struct rq *rq, struct task_struct *p, int flags); void set_task_cpu(struct task_struct *p, unsigned int new_cpu); unsigned long wait_task_inactive(struct task_struct *p, long match_state); void kick_process(struct task_struct *p); static int select_fallback_rq(int cpu, struct task_struct *p); static void update_avg(u64 *avg, u64 sample); static void ttwu_activate(struct rq *rq, struct task_struct *p, int en_flags); static int ttwu_remote(struct task_struct *p, int wake_flags); static void sched_ttwu_do_pending(struct task_struct *list); static void sched_ttwu_pending(void); void scheduler_ipi(void); static void ttwu_queue_remote(struct task_struct *p, int cpu); static int ttwu_activate_remote(struct task_struct *p, int wake_flags); static void ttwu_queue(struct task_struct *p, int cpu); static void try_to_wake_up_local(struct task_struct *p); int wake_up_process(struct task_struct *p); int wake_up_state(struct task_struct *p, unsigned int state); static void __sched_fork(struct task_struct *p); void sched_fork(struct task_struct *p); int preempt_count_cpu(int cpu); void wake_up_new_task(struct task_struct *p); void preempt_notifier_register(struct preempt_notifier *notifier); void preempt_notifier_unregister(struct preempt_notifier *notifier); static void fire_sched_in_preempt_notifiers(struct task_struct *curr); static void fire_sched_in_preempt_notifiers(struct task_struct *curr); static inline void pre_schedule(struct rq *rq, struct task_struct *prev); static inline void post_schedule(struct rq *rq); static inline void pre_schedule(struct rq *rq, struct task_struct *p); static inline void post_schedule(struct rq *rq); asmlinkage void schedule_tail(struct task_struct *prev); unsigned long get_cpu_nr_running(unsigned int cpu); unsigned long nr_running(void); unsigned long nr_uninterruptible(void); unsigned long long nr_context_switches(void); unsigned long nr_iowait(void); unsigned long avg_nr_running(void); unsigned long nr_iowait_cpu(int cpu); unsigned long this_cpu_load(void); void get_avenrun(unsigned long *loads, unsigned long offset, int shift); static long calc_load_fold_active(struct rq *this_rq); static int test_cpu_load_update_mask(void); static int cpu_load_update_mask_empty(void); static void clear_all_cpu_load_update_mask(void); static inline int calc_load_write_idx(void); static inline int calc_load_read_idx(void); void calc_load_enter_idle(void); void calc_load_exit_idle(void); static long calc_load_fold_idle(void); static long calc_load_fold_unmask_idle(void); static void calc_global_nohz(void); void calc_global_load(unsigned long ticks); static void calc_load_account_active(struct rq *this_rq); static void update_cpu_load(struct rq *this_rq); static void update_cpu_load_active(struct rq *this_rq); void sched_exec(void); static u64 do_task_delta_exec(struct task_struct *p, struct rq *rq); unsigned long long task_delta_exec(struct task_struct *p); unsigned long long task_sched_runtime(struct task_struct *p); void account_steal_time(cputime_t cputime); void account_idle_time(cputime_t cputime); static void irqtime_account_idle_ticks(int ticks); void account_process_tick(struct task_struct *p, int user_tick); void account_steal_ticks(unsigned long ticks); void account_idle_ticks(unsigned long ticks); void task_times(struct task_struct *p, cputime_t *ut, cputime_t *st); void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t *st); void task_times(struct task_struct *p, cputime_t *ut, cputime_t *st); void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t *st); void scheduler_tick(void); long get_parent_ip(unsigned long addr); void __kprobes add_preempt_count(int val); void __kprobes sub_preempt_count(int val); static noinline void __schedule_bug(struct task_struct *prev); static inline void schedule_debug(struct task_struct *prev); static void put_prev_task(struct rq *rq, struct task_struct *prev); static void __sched __schedule(void); static inline void sched_submit_work(struct task_struct *tsk); __sched schedule(void); static inline bool owner_running(struct mutex *lock, struct task_struct *owner); int mutex_spin_on_owner(struct mutex *lock, struct task_struct *owner); __sched notrace preempt_schedule(void); __sched preempt_schedule_irq(void); void __wake_up_locked(wait_queue_head_t *q, unsigned int mode); void __wake_up_locked_key(wait_queue_head_t *q, unsigned int mode, void *key); void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr_exclusive); void complete(struct completion *x); void complete_all(struct completion *x); void __sched wait_for_completion(struct completion *x); int __sched wait_for_completion_interruptible(struct completion *x); int __sched wait_for_completion_killable(struct completion *x); bool try_wait_for_completion(struct completion *x); bool completion_done(struct completion *x); void __sched interruptible_sleep_on(wait_queue_head_t *q); void __sched sleep_on(wait_queue_head_t *q); long __sched sleep_on_timeout(wait_queue_head_t *q, long timeout); void rt_mutex_setprio(struct task_struct *p, int prio); void set_user_nice(struct task_struct *p, long nice); int can_nice(const struct task_struct *p, const int nice); int task_prio(const struct task_struct *p); int task_nice(const struct task_struct *p); int idle_cpu(int cpu); struct task_struct *idle_task(int cpu); static struct task_struct *find_process_by_pid(pid_t pid); static bool check_same_owner(struct task_struct *p); long sched_setaffinity(pid_t pid, const struct cpumask *in_mask); long sched_getaffinity(pid_t pid, struct cpumask *mask); SYSCALL_DEFINE0(sched_yield); static inline int should_resched(void); static void __cond_resched(void); int __sched _cond_resched(void); int __cond_resched_lock(spinlock_t *lock); int __sched __cond_resched_softirq(void); void __sched yield(void); bool __sched yield_to(struct task_struct *p, bool preempt); void __sched io_schedule(void); long __sched io_schedule_timeout(long timeout); void sched_show_task(struct task_struct *p); void show_state_filter(unsigned long state_filter); void __cpuinit init_idle_bootup_task(struct task_struct *idle); void __cpuinit init_idle(struct task_struct *idle, int cpu); static int get_update_sysctl_factor(void); static void update_sysctl(void); static inline void sched_init_granularity(void); void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask); int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask); static int __migrate_task(struct task_struct *p, int src_cpu, int dest_cpu); static int migration_cpu_stop(void *data); void idle_task_exit(void); static void migrate_nr_uninterruptible(struct rq *rq_src); static void calc_global_load_remove(struct rq *rq); static void migrate_tasks(unsigned int dead_cpu); static struct ctl_table *sd_alloc_ctl_entry(int n); static void sd_free_ctl_entry(struct ctl_table **tablep); static ctl_table *sd_alloc_ctl_cpu_table(int cpu); static void register_sched_domain_sysctl(void); static void unregister_sched_domain_sysctl(void); static void register_sched_domain_sysctl(void); static void unregister_sched_domain_sysctl(void); static void set_rq_online(struct rq *rq); static void set_rq_offline(struct rq *rq); static int __init migration_init(void); static int __init sched_domain_debug_setup(char *str); static void sched_domain_debug(struct sched_domain *sd, int cpu); static int sd_degenerate(struct sched_domain *sd); static void free_rootdomain(struct rcu_head *rcu); static void rq_attach_root(struct rq *rq, struct root_domain *rd); static int init_rootdomain(struct root_domain *rd); static void init_defrootdomain(void); static struct root_domain *alloc_rootdomain(void); static void free_sched_groups(struct sched_group *sg, int free_sgp); static void free_sched_domain(struct rcu_head *rcu); static void destroy_sched_domain(struct sched_domain *sd, int cpu); static void destroy_sched_domains(struct sched_domain *sd, int cpu); static int __init isolated_cpu_setup(char *str); static int find_next_best_node(int node, nodemask_t *used_nodes); static void sched_domain_node_span(int node, struct cpumask *span); static const struct cpumask *cpu_node_mask(int cpu); static const struct cpumask *cpu_allnodes_mask(int cpu); static const struct cpumask *cpu_cpu_mask(int cpu); static int get_group(int cpu, struct sd_data *sdd, struct sched_group **sg); static void init_sched_groups_power(int cpu, struct sched_domain *sd); static int __init setup_relax_domain_level(char *str); static void claim_allocations(int cpu, struct sched_domain *sd); static const struct cpumask *cpu_smt_mask(int cpu); static int __sdt_alloc(const struct cpumask *cpu_map); static void __sdt_free(const struct cpumask *cpu_map); int __attribute__((weak); cpumask_var_t *alloc_sched_domains(unsigned int ndoms); void free_sched_domains(cpumask_var_t doms[], unsigned int ndoms); static int init_sched_domains(const struct cpumask *cpu_map); static void detach_destroy_domains(const struct cpumask *cpu_map); static void reinit_sched_domains(void); static ssize_t sched_power_savings_store(const char *buf, size_t count, int smt); int __init sched_create_sysfs_power_savings_entries(struct sysdev_class *cls); void __init sched_init_smp(void); void __init sched_init_smp(void); int in_sched_functions(unsigned long addr); static void init_cfs_rq(struct cfs_rq *cfs_rq, struct rq *rq); static void init_rt_rq(struct rt_rq *rt_rq, struct rq *rq); void __init sched_init(void); static inline int preempt_count_equals(int preempt_offset); int __init __might_sleep_init(void); void __might_sleep(const char *file, int line, int preempt_offset); static void normalize_task(struct rq *rq, struct task_struct *p); void normalize_rt_tasks(void); struct task_struct *curr_task(int cpu); void set_curr_task(int cpu, struct task_struct *p); static void free_fair_sched_group(struct task_group *tg); static inline void unregister_fair_sched_group(struct task_group *tg, int cpu); static inline void free_fair_sched_group(struct task_group *tg); static inline void unregister_fair_sched_group(struct task_group *tg, int cpu); static void free_rt_sched_group(struct task_group *tg); static inline void free_rt_sched_group(struct task_group *tg); static void free_sched_group(struct task_group *tg); struct task_group *sched_create_group(struct task_group *parent); static void free_sched_group_rcu(struct rcu_head *rhp); void sched_destroy_group(struct task_group *tg); void sched_move_task(struct task_struct *tsk); int sched_group_set_shares(struct task_group *tg, unsigned long shares); unsigned long sched_group_shares(struct task_group *tg); static unsigned long to_ratio(u64 period, u64 runtime); static inline int tg_has_rt_tasks(struct task_group *tg); static int tg_schedulable(struct task_group *tg, void *data); static int __rt_schedulable(struct task_group *tg, u64 period, u64 runtime); int sched_group_set_rt_runtime(struct task_group *tg, long rt_runtime_us); long sched_group_rt_runtime(struct task_group *tg); int sched_group_set_rt_period(struct task_group *tg, long rt_period_us); long sched_group_rt_period(struct task_group *tg); static int sched_rt_global_constraints(void); int sched_rt_can_attach(struct task_group *tg, struct task_struct *tsk); static int sched_rt_global_constraints(void); static inline struct task_group *cgroup_tg(struct cgroup *cgrp); static u64 cpu_shares_read_u64(struct cgroup *cgrp, struct cftype *cft); static s64 cpu_rt_runtime_read(struct cgroup *cgrp, struct cftype *cft); static u64 cpu_rt_period_read_uint(struct cgroup *cgrp, struct cftype *cft); static int cpu_cgroup_populate(struct cgroup_subsys *ss, struct cgroup *cont); int cpuacct_register_cpufreq(struct cpuacct_charge_calls *fn); static inline struct cpuacct *cgroup_ca(struct cgroup *cgrp); static inline struct cpuacct *task_ca(struct task_struct *tsk); static u64 cpuacct_cpuusage_read(struct cpuacct *ca, int cpu); static void cpuacct_cpuusage_write(struct cpuacct *ca, int cpu, u64 val); static u64 cpuusage_read(struct cgroup *cgrp, struct cftype *cft); static u64 cpuacct_powerusage_read(struct cgroup *cgrp, struct cftype *cft); static int cpuacct_populate(struct cgroup_subsys *ss, struct cgroup *cgrp); static void cpuacct_charge(struct task_struct *tsk, u64 cputime);
4c55a41ad1a9396947a700b1e8b45747a0f178d7b41c636108a0e75f3290f26d
328
Legend
Elune
6.1.1.B.0.253/external/valgrind/main/callgrind/clo.c
CLG_
Bool CLG_(process_cmd_line_option)(Char* arg) { Char* tmp_str; if VG_BOOL_CLO(arg, "--skip-plt", CLG_(clo).skip_plt) {} else if VG_BOOL_CLO(arg, "--collect-jumps", CLG_(clo).collect_jumps) {} else if VG_BOOL_CLO(arg, "--trace-jump", CLG_(clo).collect_jumps) {} else if VG_BOOL_CLO(arg, "--combine-dumps", CLG_(clo).combine_dumps) {} else if VG_BOOL_CLO(arg, "--collect-atstart", CLG_(clo).collect_atstart) {} else if VG_BOOL_CLO(arg, "--instr-atstart", CLG_(clo).instrument_atstart) {} else if VG_BOOL_CLO(arg, "--separate-threads", CLG_(clo).separate_threads) {} else if VG_BOOL_CLO(arg, "--compress-strings", CLG_(clo).compress_strings) {} else if VG_BOOL_CLO(arg, "--compress-mangled", CLG_(clo).compress_mangled) {} else if VG_BOOL_CLO(arg, "--compress-pos", CLG_(clo).compress_pos) {} else if VG_STR_CLO(arg, "--fn-skip", tmp_str) { fn_config* fnc = get_fnc(tmp_str); fnc->skip = CONFIG_TRUE; } else if VG_STR_CLO(arg, "--dump-before", tmp_str) { fn_config* fnc = get_fnc(tmp_str); fnc->dump_before = CONFIG_TRUE; } else if VG_STR_CLO(arg, "--zero-before", tmp_str) { fn_config* fnc = get_fnc(tmp_str); fnc->zero_before = CONFIG_TRUE; } else if VG_STR_CLO(arg, "--dump-after", tmp_str) { fn_config* fnc = get_fnc(tmp_str); fnc->dump_after = CONFIG_TRUE; } else if VG_STR_CLO(arg, "--toggle-collect", tmp_str) { fn_config* fnc = get_fnc(tmp_str); fnc->toggle_collect = CONFIG_TRUE; CLG_(clo).collect_atstart = False; } else if VG_INT_CLO(arg, "--separate-recs", CLG_(clo).separate_recursions) {} else if VG_XACT_CLO(arg, "--pop-on-jump", CLG_(clo).pop_on_jump, True) {} else if VG_STR_CLO( arg, "--pop-on-jump", tmp_str) { fn_config* fnc = get_fnc(tmp_str); fnc->pop_on_jump = CONFIG_TRUE; } #if CLG_ENABLE_DEBUG else if VG_INT_CLO(arg, "--ct-verbose", CLG_(clo).verbose) {} else if VG_INT_CLO(arg, "--ct-vstart", CLG_(clo).verbose_start) {} else if VG_STREQN(12, arg, "--ct-verbose") { fn_config* fnc; Char* s; UInt n = VG_(strtoll10)(arg+12, &s); if ((n <= 0) || *s != '=') return False; fnc = get_fnc(s+1); fnc->verbosity = n; } #endif else if VG_XACT_CLO(arg, "--separate-callers=auto", CLG_(clo).separate_callers, CONFIG_AUTO) {} else if VG_INT_CLO( arg, "--separate-callers", CLG_(clo).separate_callers) {} else if VG_STREQN(10, arg, "--fn-group") { fn_config* fnc; Char* s; UInt n = VG_(strtoll10)(arg+10, &s); if ((n <= 0) || *s != '=') return False; fnc = get_fnc(s+1); fnc->group = n; } else if VG_STREQN(18, arg, "--separate-callers") { fn_config* fnc; Char* s; UInt n = VG_(strtoll10)(arg+18, &s); if ((n <= 0) || *s != '=') return False; fnc = get_fnc(s+1); fnc->separate_callers = n; } else if VG_STREQN(15, arg, "--separate-recs") { fn_config* fnc; Char* s; UInt n = VG_(strtoll10)(arg+15, &s); if ((n <= 0) || *s != '=') return False; fnc = get_fnc(s+1); fnc->separate_recursions = n; } else if VG_STR_CLO(arg, "--callgrind-out-file", CLG_(clo).out_format) {} else if VG_BOOL_CLO(arg, "--mangle-names", CLG_(clo).mangle_names) {} else if VG_BOOL_CLO(arg, "--skip-direct-rec", CLG_(clo).skip_direct_recursion) {} else if VG_BOOL_CLO(arg, "--dump-bbs", CLG_(clo).dump_bbs) {} else if VG_BOOL_CLO(arg, "--dump-line", CLG_(clo).dump_line) {} else if VG_BOOL_CLO(arg, "--dump-instr", CLG_(clo).dump_instr) {} else if VG_BOOL_CLO(arg, "--dump-bb", CLG_(clo).dump_bb) {} else if VG_INT_CLO( arg, "--dump-every-bb", CLG_(clo).dump_every_bb) {} else if VG_BOOL_CLO(arg, "--collect-alloc", CLG_(clo).collect_alloc) {} else if VG_BOOL_CLO(arg, "--collect-systime", CLG_(clo).collect_systime) {} else if VG_BOOL_CLO(arg, "--collect-bus", CLG_(clo).collect_bus) {} else if VG_BOOL_CLO(arg, "--cache-sim", CLG_(clo).simulate_cache) {} else if VG_BOOL_CLO(arg, "--simulate-cache", CLG_(clo).simulate_cache) {} else if VG_BOOL_CLO(arg, "--branch-sim", CLG_(clo).simulate_branch) {} else { Bool isCachesimOption = (*CLG_(cachesim).parse_opt)(arg); if (isCachesimOption) CLG_(clo).simulate_cache = True; return isCachesimOption; } return True; }
static config_node* new_config(Char* name, int length); static fn_config* get_fnc2(config_node* node, Char* name); static void print_config_node(int depth, int hash, config_node* node); static fn_config* get_fnc(Char* name); static void update_fn_config1(fn_node* fn, fn_config* fnc); static void update_fn_config2(fn_node* fn, Char* name, config_node* node); void CLG_(update_fn_config); void CLG_(print_usage); void CLG_(set_clo_defaults);
b3e06f7ec9ec2c877db68e7ff0b5589678509021ce2389c86a8dad0d143c0d46
4,589
spacex
kernel-centos5
net/ipv4/inet_hashtables.c
inet_hash_connect
int inet_hash_connect(struct inet_timewait_death_row *death_row, struct sock *sk) { struct inet_hashinfo *hinfo = death_row->hashinfo; const unsigned short snum = inet_sk(sk)->num; struct inet_bind_hashbucket *head; struct inet_bind_bucket *tb; int ret; if (!snum) { int i, remaining, low, high, port; static u32 hint; u32 offset = hint + inet_sk_port_offset(sk); struct hlist_node *node; struct inet_timewait_sock *tw = NULL; inet_get_local_port_range(&low, &high); remaining = (high - low) + 1; local_bh_disable(); for (i = 1; i <= remaining; i++) { port = low + (i + offset) % remaining; if (inet_is_reserved_local_port(port)) continue; head = &hinfo->bhash[inet_bhashfn(port, hinfo->bhash_size)]; spin_lock(&head->lock); inet_bind_bucket_for_each(tb, node, &head->chain) { if (tb->port == port) { BUG_TRAP(!hlist_empty(&tb->owners)); if (tb->fastreuse >= 0) goto next_port; if (!__inet_check_established(death_row, sk, port, &tw)) goto ok; goto next_port; } } tb = inet_bind_bucket_create(hinfo->bind_bucket_cachep, head, port); if (!tb) { spin_unlock(&head->lock); break; } tb->fastreuse = -1; goto ok; next_port: spin_unlock(&head->lock); } local_bh_enable(); return -EADDRNOTAVAIL; ok: hint += i; inet_bind_hash(sk, tb, port); if (sk_unhashed(sk)) { inet_sk(sk)->sport = htons(port); __inet_hash(hinfo, sk, 0); } spin_unlock(&head->lock); if (tw) { inet_twsk_deschedule(tw, death_row); inet_twsk_put(tw); } ret = 0; goto out; } head = &hinfo->bhash[inet_bhashfn(snum, hinfo->bhash_size)]; tb = inet_csk(sk)->icsk_bind_hash; spin_lock_bh(&head->lock); if (sk_head(&tb->owners) == sk && !sk->sk_bind_node.next) { __inet_hash(hinfo, sk, 0); spin_unlock_bh(&head->lock); return 0; } else { spin_unlock(&head->lock); ret = __inet_check_established(death_row, sk, snum, NULL); out: local_bh_enable(); return ret; } }
void inet_bind_bucket_destroy(kmem_cache_t *cachep, struct inet_bind_bucket *tb); static void __inet_put_port(struct inet_hashinfo *hashinfo, struct sock *sk); void inet_put_port(struct inet_hashinfo *hashinfo, struct sock *sk); void inet_listen_wlock(struct inet_hashinfo *hashinfo); static inline u32 inet_sk_port_offset(const struct sock *sk);
1e1312f1f91d70bd866197c36f82a2bdbe6c86bf8fe0e144678539354b3e2a27
2,095
ystk
debian-openipmi
lanserv/lanserv_config.c
int get_auths
static int get_auths(char **tokptr, unsigned int *rval, char **err) { char *tok = strtok_r(NULL, " \t\n", tokptr); int val = 0; while (tok) { if (strcmp(tok, "none") == 0) val |= (1 << IPMI_AUTHTYPE_NONE); else if (strcmp(tok, "md2") == 0) val |= (1 << IPMI_AUTHTYPE_MD2); else if (strcmp(tok, "md5") == 0) val |= (1 << IPMI_AUTHTYPE_MD5); else if (strcmp(tok, "straight") == 0) val |= (1 << IPMI_AUTHTYPE_STRAIGHT); else { *err = "Invalid authorization type, must be 'none', 'md2'," " 'md5', or 'straight'"; return -1; } tok = strtok_r(NULL, " \t\n", tokptr); } *rval = val; return 0; }
3a232dd436935129605b4a50ee3d9ce8c77c7343be40baa91a9e1ae55756caa7
656
MessiahAndrw
Stereoscopic-VLC
src/video_output/vout_intf.c
vout_EnableFilter
void vout_EnableFilter( vout_thread_t *p_vout, const char *psz_name, bool b_add, bool b_setconfig ) { char *psz_parser; char *psz_string; const char *psz_filter_type; module_t *p_obj = module_find( psz_name ); if( !p_obj ) { msg_Err( p_vout, "Unable to find filter module \"%s\".", psz_name ); return; } if( module_provides( p_obj, "video filter2" ) ) { psz_filter_type = "video-filter"; } else if( module_provides( p_obj, "sub source" ) ) { psz_filter_type = "sub-source"; } else if( module_provides( p_obj, "sub filter" ) ) { psz_filter_type = "sub-filter"; } else { module_release( p_obj ); msg_Err( p_vout, "Unknown video filter type." ); return; } module_release( p_obj ); psz_string = var_GetString( p_vout, psz_filter_type ); if( !psz_string ) psz_string = strdup(""); psz_parser = strstr( psz_string, psz_name ); if( b_add ) { if( !psz_parser ) { psz_parser = psz_string; if( asprintf( &psz_string, (*psz_string) ? "%s:%s" : "%s%s", psz_string, psz_name ) == -1 ) { free( psz_parser ); return; } free( psz_parser ); } else return; } else { if( psz_parser ) { memmove( psz_parser, psz_parser + strlen(psz_name) + (*(psz_parser + strlen(psz_name)) == ':' ? 1 : 0 ), strlen(psz_parser + strlen(psz_name)) + 1 ); if( *(psz_string+strlen(psz_string ) -1 ) == ':' ) { *(psz_string+strlen(psz_string ) -1 ) = '\0'; } } else { free( psz_string ); return; } } if( b_setconfig ) { config_PutPsz( p_vout, psz_filter_type, psz_string ); } var_SetString( p_vout, psz_filter_type, psz_string ); free( psz_string ); }
void vout_IntfInit( vout_thread_t *p_vout ); static int VoutSnapshotPip( vout_thread_t *p_vout, picture_t *p_pic ); static void VoutOsdSnapshot( vout_thread_t *p_vout, picture_t *p_pic, const char *psz_filename ); static void VoutSaveSnapshot( vout_thread_t *p_vout );
8f07fe8d8af444011e033077fff737ec7523376a642759dc3c8ba21f637402a8
2,132
system1357
pdk7105-3.4
drivers/stm/clocks/clock-stxsasg2.c
clkgenax_disable
static int clkgenax_disable(struct clk *clk_p) { unsigned long val; int idx, shift; unsigned long srcreg; void *base_address; if (!clk_p) return CLK_ERR_BAD_PARAMETER; switch (clk_p->id) { case CLK_S_A0_REF: case CLK_S_A1_REF: return 0; case CLK_S_A0_PLL0HS ... CLK_S_A0_PLL1: case CLK_S_A1_PLL0HS ... CLK_S_A1_PLL1: return clkgenax_xable_pll(clk_p, 0); default: break; } idx = clkgenax_get_index(clk_p->id, &srcreg, &shift); if (idx == -1) return CLK_ERR_BAD_PARAMETER; base_address = clkgenax_get_base_address(clk_p->id); val = CLK_READ(base_address + srcreg) & ~(0x3 << shift); val = val | (3 << shift); CLK_WRITE(base_address + srcreg, val); clk_p->rate = 0; return 0; }
static inline int clkgenax_get_bank(int clk_id); static inline void *clkgenax_get_base_address(int clk_id); static int clkgenax_get_index(int clkid, unsigned long *srcreg, int *shift); static int clkgenax_recalc(struct clk *clk_p); static int clkgenax_set_parent(struct clk *clk_p, struct clk *src_p); static int clkgenax_identify_parent(struct clk *clk_p); static int clkgenax_init(struct clk *clk_p); static int clkgenax_xable_pll(struct clk *clk_p, int enable); static int clkgenax_enable(struct clk *clk_p); static int clkgenax_set_div(struct clk *clk_p, unsigned long *div_p); static int clkgena0_set_rate(struct clk *clk_p, unsigned long freq); static int clkgena1_set_rate(struct clk *clk_p, unsigned long freq); static int clkgenb_fsyn_recalc(struct clk *clk_p); static int clkgenb_recalc(struct clk *clk_p); static int clkgenb_fsyn_xable(struct clk *clk_p, unsigned long enable); static int clkgenb_fsyn_set_rate(struct clk *clk_p, unsigned long freq); static int clkgenb_enable(struct clk *clk_p); static int clkgenb_disable(struct clk *clk_p); static int clkgenb_set_rate(struct clk *clk_p, unsigned long freq); static int clkgenb_init(struct clk *clk_p); static int clkgenc_fsyn_recalc(struct clk *clk_p); static int clkgenc_fsyn_xable(struct clk *clk_p, unsigned long enable); static int clkgenc_vcc_recalc(struct clk *clk_p); static int clkgenc_vcc_xable(struct clk *clk_p, int enable); static int clkgenc_vcc_set_div(struct clk *clk_p, unsigned long *div_p); static int clkgenc_recalc(struct clk *clk_p); static int clkgenc_set_rate(struct clk *clk_p, unsigned long freq); static int clkgenc_identify_parent(struct clk *clk_p); static int clkgenc_set_parent(struct clk *clk_p, struct clk *parent_p); static int clkgenc_init(struct clk *clk_p); static int clkgenc_enable(struct clk *clk_p); static int clkgenc_disable(struct clk *clk_p); static int clkgend_fsyn_recalc(struct clk *clk_p); static int clkgend_recalc(struct clk *clk_p); static int clkgend_fsyn_set_rate(struct clk *clk_p, unsigned long freq); static int clkgend_fsyn_xable(struct clk *clk_p, unsigned long enable); static int clkgend_init(struct clk *clk_p); static int clkgend_enable(struct clk *clk_p); static int clkgend_disable(struct clk *clk_p); static int clkgenhdmirx_recalc(struct clk *clk_p); static int clkgenhdmirx_init(struct clk *clk_p); static int clkgenhdmirx_enable(struct clk *clk_p); int __init sasg2_clk_init(struct sysconf_field *(*plat_sysconf_claimu);
9790d0f3bc994c338d94fb3e47e88aae327e09315e5c1fe976968cd181ecaea8
723
phuong-nm
STM32L1xx
Demos/Drivers/BSP/STM32L1xx_Nucleo/stm32l1xx_nucleo.c
BSP_PB_Init
void BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef ButtonMode) { GPIO_InitTypeDef gpioinitstruct = {0}; BUTTONx_GPIO_CLK_ENABLE(Button); if (ButtonMode == BUTTON_MODE_GPIO) { gpioinitstruct.Pin = BUTTON_PIN[Button]; gpioinitstruct.Mode = GPIO_MODE_INPUT; gpioinitstruct.Pull = GPIO_NOPULL; gpioinitstruct.Speed = GPIO_SPEED_MEDIUM; HAL_GPIO_Init(BUTTON_PORT[Button], &gpioinitstruct); } if (ButtonMode == BUTTON_MODE_EXTI) { gpioinitstruct.Pin = BUTTON_PIN[Button]; gpioinitstruct.Pull = GPIO_NOPULL; gpioinitstruct.Speed = GPIO_SPEED_MEDIUM; gpioinitstruct.Mode = GPIO_MODE_IT_FALLING; HAL_GPIO_Init(BUTTON_PORT[Button], &gpioinitstruct); HAL_NVIC_SetPriority((IRQn_Type)(BUTTON_IRQn[Button]), 0x0F, 0); HAL_NVIC_EnableIRQ((IRQn_Type)(BUTTON_IRQn[Button])); } }
uint32_t BSP_GetVersion(void); void BSP_LED_Init(Led_TypeDef Led); void BSP_LED_On(Led_TypeDef Led); void BSP_LED_Off(Led_TypeDef Led); void BSP_LED_Toggle(Led_TypeDef Led); uint32_t BSP_PB_GetState(Button_TypeDef Button); uint8_t BSP_JOY_Init(void); JOYState_TypeDef BSP_JOY_GetState(void); static void SPIx_MspInit(void); static void SPIx_Init(void); static uint32_t SPIx_Read(void); static void SPIx_Write(uint8_t Value); static void SPIx_Error (void); void SD_IO_Init(void); void SD_IO_WriteByte(uint8_t Data); uint8_t SD_IO_ReadByte(void); HAL_StatusTypeDef SD_IO_WriteCmd(uint8_t Cmd, uint32_t Arg, uint8_t Crc, uint8_t Response); HAL_StatusTypeDef SD_IO_WaitResponse(uint8_t Response); void SD_IO_WriteDummy(void); void LCD_IO_Init(void); void LCD_IO_WriteReg(uint8_t LCDReg); void LCD_IO_WriteMultipleData(uint8_t *pData, uint32_t Size); void LCD_Delay(uint32_t Delay); static void ADCx_MspInit(ADC_HandleTypeDef *hadc); static void ADCx_Init(void);
e5ba1dfc488a724a377db691eb4e79b7ac8d13f552dbc6d4b6d30984cb3fd289
913
rydnr
radare2
libr/db/sdb/src/cdb_make.c
*alloc
char *alloc(unsigned int n) { n = ALIGNMENT + n - (n & (ALIGNMENT - 1)); if (n <= avail) { avail -= n; return space + avail; } return (char*)malloc (n); }
void alloc_free(void *x); int cdb_make_start(struct cdb_make *c, int fd); static inline int posplus(struct cdb_make *c, ut32 len); int cdb_make_addend(struct cdb_make *c, ut32 keylen, ut32 datalen, ut32 h); static void pack_kvlen(ut8 *buf, ut32 klen, ut32 vlen); int cdb_make_addbegin(struct cdb_make *c,unsigned int keylen,unsigned int datalen); int cdb_make_add(struct cdb_make *c,const char *key,unsigned int keylen,const char *data,unsigned int datalen); int cdb_make_finish(struct cdb_make *c);
e4504fa523e2de5a5b439f57874c077272cf7818f9e7c1993e9ac19191e78868
160
dkasak
notify-osd-customizable
tests/test-dbus.c
void test_dbus_get_capabilities
static void test_dbus_get_capabilities (gpointer fixture, gconstpointer user_data) { char **caps = NULL; gboolean ret = FALSE; ret = stack_get_capabilities (NULL, &caps); g_assert (ret); g_assert (!g_strcmp0 (caps[0], "body")); int i = 0; while (caps[i] != NULL) { g_assert (!g_strrstr (caps[i++], "actions")); } }
40d4e1d428857c67b61bd331957c7cb57c76423fa0975414aa9953807ec4fed1
329
derekxkwan
dxkpure
src/dkenv.c
dkenv_tilde_setup
void dkenv_tilde_setup(void){ dkenv_tilde_class = class_new(gensym("dkenv~"), (t_newmethod)dkenv_tilde_new, (t_method)dkenv_tilde_free, sizeof(t_dkenv_tilde), 0, A_GIMME, 0); class_addmethod(dkenv_tilde_class, (t_method)dkenv_tilde_dsp, gensym("dsp"), A_CANT, 0); class_addmethod(dkenv_tilde_class, (t_method)dkenv_param, gensym("param"), A_GIMME, 0); class_addmethod(dkenv_tilde_class, (t_method)dkenv_env, gensym("env"), A_SYMBOL, 0); class_addmethod(dkenv_tilde_class, (t_method)dkenv_lvl, gensym("level"), A_FLOAT, 0); class_addmethod(dkenv_tilde_class, (t_method)dkenv_dur, gensym("dur"), A_FLOAT, 0); class_addbang(dkenv_tilde_class, dkenv_tilde_bang); CLASS_MAINSIGNALIN(dkenv_tilde_class, t_dkenv_tilde, x_in); }
static void buildperc(t_dkenv_tilde * x, t_float attms, t_float relms, t_float curve); static void buildtri(t_dkenv_tilde * x); static void buildsin(t_dkenv_tilde *x); static void buildlinen(t_dkenv_tilde *x, t_float attms, t_float susms, t_float relms, curvetype curve); static void dkenv_param(t_dkenv_tilde *x, t_symbol *s, int argc, t_atom * argv); static void dkenv_env(t_dkenv_tilde * x, t_symbol * s); void *dkenv_tilde_new(t_symbol *s, int argc, t_atom *argv); static t_int *dkenv_tilde_perform(t_int *w); static void dkenv_tilde_dsp(t_dkenv_tilde *x, t_signal **sp); static void *dkenv_tilde_free(t_dkenv_tilde *x); static void dkenv_tilde_bang(t_dkenv_tilde *x); static void dkenv_lvl(t_dkenv_tilde *x, t_float f); static void dkenv_dur(t_dkenv_tilde *x, t_float f);
acd59e4e4cbaef214d33a607996987ea777d34fa854271bed18591b460161002
745
12thmantec
novena-linux
drivers/net/ethernet/ethernet/sfc/efx.c
efx_probe_channel
static int efx_probe_channel(struct efx_channel *channel) { struct efx_tx_queue *tx_queue; struct efx_rx_queue *rx_queue; int rc; netif_dbg(channel->efx, probe, channel->efx->net_dev, "creating channel %d\n", channel->channel); rc = channel->type->pre_probe(channel); if (rc) goto fail; rc = efx_probe_eventq(channel); if (rc) goto fail; efx_for_each_channel_tx_queue(tx_queue, channel) { rc = efx_probe_tx_queue(tx_queue); if (rc) goto fail; } efx_for_each_channel_rx_queue(rx_queue, channel) { rc = efx_probe_rx_queue(rx_queue); if (rc) goto fail; } channel->n_rx_frm_trunc = 0; return 0; fail: efx_remove_channel(channel); return rc; }
static int efx_check_disabled(struct efx_nic *efx); static int efx_process_channel(struct efx_channel *channel, int budget); static int efx_poll(struct napi_struct *napi, int budget); static int efx_probe_eventq(struct efx_channel *channel); static int efx_init_eventq(struct efx_channel *channel); static void efx_start_eventq(struct efx_channel *channel); static void efx_stop_eventq(struct efx_channel *channel); static void efx_fini_eventq(struct efx_channel *channel); static void efx_remove_eventq(struct efx_channel *channel); static void efx_set_channel_names(struct efx_nic *efx); static int efx_probe_channels(struct efx_nic *efx); static void efx_start_datapath(struct efx_nic *efx); static void efx_stop_datapath(struct efx_nic *efx); static void efx_remove_channel(struct efx_channel *channel); static void efx_remove_channels(struct efx_nic *efx); void efx_schedule_slow_fill(struct efx_rx_queue *rx_queue); int efx_channel_dummy_op_int(struct efx_channel *channel); void efx_channel_dummy_op_void(struct efx_channel *channel); void efx_link_status_changed(struct efx_nic *efx); void efx_link_set_advertising(struct efx_nic *efx, u32 advertising); void efx_link_set_wanted_fc(struct efx_nic *efx, u8 wanted_fc); int __efx_reconfigure_port(struct efx_nic *efx); int efx_reconfigure_port(struct efx_nic *efx); static void efx_mac_work(struct work_struct *data); static int efx_probe_port(struct efx_nic *efx); static int efx_init_port(struct efx_nic *efx); static void efx_start_port(struct efx_nic *efx); static void efx_stop_port(struct efx_nic *efx); static void efx_fini_port(struct efx_nic *efx); static void efx_remove_port(struct efx_nic *efx); static bool efx_same_controller(struct efx_nic *left, struct efx_nic *right); static void efx_associate(struct efx_nic *efx); static void efx_dissociate(struct efx_nic *efx); static int efx_init_io(struct efx_nic *efx); static void efx_fini_io(struct efx_nic *efx); static unsigned int efx_wanted_parallelism(struct efx_nic *efx); static int efx_probe_interrupts(struct efx_nic *efx); static int efx_soft_enable_interrupts(struct efx_nic *efx); static void efx_soft_disable_interrupts(struct efx_nic *efx); static int efx_enable_interrupts(struct efx_nic *efx); static void efx_disable_interrupts(struct efx_nic *efx); static void efx_remove_interrupts(struct efx_nic *efx); static void efx_set_channels(struct efx_nic *efx); static int efx_probe_nic(struct efx_nic *efx); static void efx_remove_nic(struct efx_nic *efx); static int efx_probe_filters(struct efx_nic *efx); static void efx_remove_filters(struct efx_nic *efx); static void efx_restore_filters(struct efx_nic *efx); static int efx_probe_all(struct efx_nic *efx); static void efx_start_all(struct efx_nic *efx); static void efx_stop_all(struct efx_nic *efx); static void efx_remove_all(struct efx_nic *efx); static unsigned int irq_mod_ticks(unsigned int usecs, unsigned int quantum_ns); static void efx_monitor(struct work_struct *data); static int efx_ioctl(struct net_device *net_dev, struct ifreq *ifr, int cmd); static void efx_init_napi_channel(struct efx_channel *channel); static void efx_init_napi(struct efx_nic *efx); static void efx_fini_napi_channel(struct efx_channel *channel); static void efx_fini_napi(struct efx_nic *efx); static void efx_netpoll(struct net_device *net_dev); static int efx_net_open(struct net_device *net_dev); static int efx_net_stop(struct net_device *net_dev); static void efx_watchdog(struct net_device *net_dev); static int efx_change_mtu(struct net_device *net_dev, int new_mtu); static int efx_set_mac_address(struct net_device *net_dev, void *data); static void efx_set_rx_mode(struct net_device *net_dev); static int efx_set_features(struct net_device *net_dev, netdev_features_t data); static void efx_update_name(struct efx_nic *efx); static int efx_register_netdev(struct efx_nic *efx); static void efx_unregister_netdev(struct efx_nic *efx); void efx_reset_down(struct efx_nic *efx, enum reset_type method); int efx_reset_up(struct efx_nic *efx, enum reset_type method, bool ok); int efx_reset(struct efx_nic *efx, enum reset_type method); int efx_try_recovery(struct efx_nic *efx); static void efx_wait_for_bist_end(struct efx_nic *efx); static void efx_reset_work(struct work_struct *data); void efx_schedule_reset(struct efx_nic *efx, enum reset_type type); int efx_port_dummy_op_int(struct efx_nic *efx); static bool efx_port_dummy_op_poll(struct efx_nic *efx); static void efx_fini_struct(struct efx_nic *efx); static void efx_pci_remove_main(struct efx_nic *efx); static void efx_pci_remove(struct pci_dev *pci_dev); static void efx_probe_vpd_strings(struct efx_nic *efx); static int efx_pci_probe_main(struct efx_nic *efx); static int efx_pm_freeze(struct device *dev); static int efx_pm_thaw(struct device *dev); static int efx_pm_poweroff(struct device *dev); static int efx_pm_resume(struct device *dev); static int efx_pm_suspend(struct device *dev); static pci_ers_result_t efx_io_slot_reset(struct pci_dev *pdev); static void efx_io_resume(struct pci_dev *pdev); static int __init efx_init_module(void); static void __exit efx_exit_module(void);
ca366c5b6ce6ebac9437e5f4ac09aeaf707a2c3cf184d205568101e820930cf2
685
penberg
linux
net/wireless/scan.c
element *cfg80211_get_profile_continuation
static const struct element *cfg80211_get_profile_continuation(const u8 *ie, size_t ielen, const struct element *mbssid_elem, const struct element *sub_elem) { const u8 *mbssid_end = mbssid_elem->data + mbssid_elem->datalen; const struct element *next_mbssid; const struct element *next_sub; next_mbssid = cfg80211_find_elem(WLAN_EID_MULTIPLE_BSSID, mbssid_end, ielen - (mbssid_end - ie)); if ((sub_elem->data + sub_elem->datalen < mbssid_end - 1) || !next_mbssid) return NULL; if (next_mbssid->datalen < 4) return NULL; next_sub = (void *)&next_mbssid->data[1]; if (next_mbssid->data + next_mbssid->datalen < next_sub->data + next_sub->datalen) return NULL; if (next_sub->id != 0 || next_sub->datalen < 2) return NULL; return next_sub->data[0] == WLAN_EID_NON_TX_BSSID_CAP ? NULL : next_mbssid; }
static void bss_free(struct cfg80211_internal_bss *bss); static bool cfg80211_bss_expire_oldest(struct cfg80211_registered_device *rdev); void __cfg80211_scan_done(struct work_struct *wk); void cfg80211_sched_scan_results_wk(struct work_struct *work); void cfg80211_sched_scan_results(struct wiphy *wiphy, u64 reqid); void cfg80211_sched_scan_stopped_rtnl(struct wiphy *wiphy, u64 reqid); void cfg80211_sched_scan_stopped(struct wiphy *wiphy, u64 reqid); void cfg80211_bss_expire(struct cfg80211_registered_device *rdev); void cfg80211_bss_flush(struct wiphy *wiphy); void cfg80211_ref_bss(struct wiphy *wiphy, struct cfg80211_bss *pub); void cfg80211_put_bss(struct wiphy *wiphy, struct cfg80211_bss *pub); void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *pub);
d4197b40c801b1a4c68007f055c1435850d2cbb5c4c16eddfdc8dfe7b81b13f1
877
LeMaker
WiringLMK
examples/interrupt_test.c
myInterrupt2
void myInterrupt2 (void) { printf("The Phy pin 18 is detected..............\n"); }
void myInterrupt1 (void); void myInterrupt3 (void); void myInterrupt4 (void); void myInterrupt5 (void); void myInterrupt6 (void); int main(int argc, char **argv);
1b61e3f4bd2f10b71466afc08877258dda88ae7fc10eecf53fc00d68b27b218d
87
ImageMagick
glib
glib/giochannel.c
write_chars
write_chars (GIOChannel *channel, const gchar *buf, gssize count, gsize *bytes_written, GError **error) { gsize count_unsigned; GIOStatus status; gssize wrote_bytes = 0; g_return_val_if_fail (channel != NULL, G_IO_STATUS_ERROR); g_return_val_if_fail ((error == NULL) || (*error == NULL), G_IO_STATUS_ERROR); g_return_val_if_fail (channel->is_writeable, G_IO_STATUS_ERROR); if ((count < 0) && buf) count = strlen (buf); count_unsigned = count; if (count_unsigned == 0) { if (bytes_written) *bytes_written = 0; return G_IO_STATUS_NORMAL; } g_return_val_if_fail (buf != NULL, G_IO_STATUS_ERROR); g_return_val_if_fail (count_unsigned > 0, G_IO_STATUS_ERROR); if (!channel->use_buffer) { gsize tmp_bytes; g_assert (!channel->write_buf || channel->write_buf->len == 0); g_assert (channel->partial_write_buf[0] == '\0'); status = channel->funcs->io_write (channel, buf, count_unsigned, &tmp_bytes, error); if (bytes_written) *bytes_written = tmp_bytes; return status; } if (channel->is_seekable && (( BUF_LEN (channel->read_buf) > 0) || (BUF_LEN (channel->encoded_read_buf) > 0))) { if (channel->do_encode && BUF_LEN (channel->encoded_read_buf) > 0) { g_warning ("Mixed reading and writing not allowed on encoded files"); return G_IO_STATUS_ERROR; } status = g_io_channel_seek_position (channel, 0, G_SEEK_CUR, error); if (status != G_IO_STATUS_NORMAL) { if (bytes_written) *bytes_written = 0; return status; } } if (!channel->write_buf) channel->write_buf = g_string_sized_new (channel->buf_size); while (wrote_bytes < count) { gsize space_in_buf; if (channel->write_buf->len >= channel->buf_size - MAX_CHAR_SIZE) { gsize did_write = 0, this_time; do { status = channel->funcs->io_write (channel, channel->write_buf->str + did_write, channel->write_buf->len - did_write, &this_time, error); did_write += this_time; } while (status == G_IO_STATUS_NORMAL && did_write < MIN (channel->write_buf->len, MAX_CHAR_SIZE)); g_string_erase (channel->write_buf, 0, did_write); if (status != G_IO_STATUS_NORMAL) { if (status == G_IO_STATUS_AGAIN && wrote_bytes > 0) status = G_IO_STATUS_NORMAL; if (bytes_written) *bytes_written = wrote_bytes; return status; } } space_in_buf = MAX (channel->buf_size, channel->write_buf->allocated_len - 1) - channel->write_buf->len; g_assert (space_in_buf >= MAX_CHAR_SIZE); if (!channel->encoding) { gssize write_this = MIN (space_in_buf, count_unsigned - wrote_bytes); g_string_append_len (channel->write_buf, buf, write_this); buf += write_this; wrote_bytes += write_this; } else { const gchar *from_buf; gsize from_buf_len, from_buf_old_len, left_len; gsize err; gint errnum; if (channel->partial_write_buf[0] != '\0') { g_assert (wrote_bytes == 0); from_buf = channel->partial_write_buf; from_buf_old_len = strlen (channel->partial_write_buf); g_assert (from_buf_old_len > 0); from_buf_len = MIN (6, from_buf_old_len + count_unsigned); memcpy (channel->partial_write_buf + from_buf_old_len, buf, from_buf_len - from_buf_old_len); } else { from_buf = buf; from_buf_len = count_unsigned - wrote_bytes; from_buf_old_len = 0; } reconvert: if (!channel->do_encode) { const gchar *badchar; gsize try_len = MIN (from_buf_len, space_in_buf); if (!g_utf8_validate_len (from_buf, try_len, &badchar)) { gunichar try_char; gsize incomplete_len = from_buf + try_len - badchar; left_len = from_buf + from_buf_len - badchar; try_char = g_utf8_get_char_validated (badchar, incomplete_len); switch (try_char) { case -2: g_assert (incomplete_len < 6); if (try_len == from_buf_len) { errnum = EINVAL; err = (gsize) -1; } else { errnum = 0; err = (gsize) 0; } break; case -1: g_warning ("Invalid UTF-8 passed to g_io_channel_write_chars()."); errnum = EILSEQ; err = (gsize) -1; break; default: g_assert_not_reached (); err = (gsize) -1; errnum = 0; } } else { err = (gsize) 0; errnum = 0; left_len = from_buf_len - try_len; } g_string_append_len (channel->write_buf, from_buf, from_buf_len - left_len); from_buf += from_buf_len - left_len; } else { gchar *outbuf; left_len = from_buf_len; g_string_set_size (channel->write_buf, channel->write_buf->len + space_in_buf); outbuf = channel->write_buf->str + channel->write_buf->len - space_in_buf; err = g_iconv (channel->write_cd, (gchar **) &from_buf, &left_len, &outbuf, &space_in_buf); errnum = errno; g_string_truncate (channel->write_buf, channel->write_buf->len - space_in_buf); } if (err == (gsize) -1) { switch (errnum) { case EINVAL: g_assert (left_len < 6); if (from_buf_old_len == 0) { memcpy (channel->partial_write_buf, from_buf, left_len); channel->partial_write_buf[left_len] = '\0'; if (bytes_written) *bytes_written = count_unsigned; return G_IO_STATUS_NORMAL; } if (left_len == from_buf_len) { g_assert (count_unsigned == from_buf_len - from_buf_old_len); channel->partial_write_buf[from_buf_len] = '\0'; if (bytes_written) *bytes_written = count_unsigned; return G_IO_STATUS_NORMAL; } g_assert (from_buf_len - left_len >= from_buf_old_len); break; case E2BIG: if (from_buf_len == left_len) { space_in_buf += MAX_CHAR_SIZE; goto reconvert; } break; case EILSEQ: g_set_error_literal (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE, _("Invalid byte sequence in conversion input")); if (from_buf_old_len > 0 && from_buf_len == left_len) g_warning ("Illegal sequence due to partial character " "at the end of a previous write."); else wrote_bytes += from_buf_len - left_len - from_buf_old_len; if (bytes_written) *bytes_written = wrote_bytes; channel->partial_write_buf[0] = '\0'; return G_IO_STATUS_ERROR; default: g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_FAILED, _("Error during conversion: %s"), g_strerror (errnum)); if (from_buf_len >= left_len + from_buf_old_len) wrote_bytes += from_buf_len - left_len - from_buf_old_len; if (bytes_written) *bytes_written = wrote_bytes; channel->partial_write_buf[0] = '\0'; return G_IO_STATUS_ERROR; } } g_assert (from_buf_len - left_len >= from_buf_old_len); wrote_bytes += from_buf_len - left_len - from_buf_old_len; if (from_buf_old_len > 0) { buf += from_buf_len - left_len - from_buf_old_len; channel->partial_write_buf[0] = '\0'; } else buf = from_buf; } } if (bytes_written) *bytes_written = count_unsigned; return G_IO_STATUS_NORMAL; } /** * g_io_channel_wr
_io_channel_get_encoding (GIOChannel *channel);
38e00f36dc3f67a9bb7b2d7c4fd11cc3e85b4fa2999c7e8b453a48134e430495
10,025
1N4148
android_kernel_samsung_msm7x27a
GT-S7500_Kernel/drivers/net/igb/e1000_nvm.c
igb_write_nvm_spi
s32 igb_write_nvm_spi(struct e1000_hw *hw, u16 offset, u16 words, u16 *data) { struct e1000_nvm_info *nvm = &hw->nvm; s32 ret_val; u16 widx = 0; if ((offset >= nvm->word_size) || (words > (nvm->word_size - offset)) || (words == 0)) { hw_dbg("nvm parameter(s) out of bounds\n"); ret_val = -E1000_ERR_NVM; goto out; } ret_val = hw->nvm.ops.acquire(hw); if (ret_val) goto out; msleep(10); while (widx < words) { u8 write_opcode = NVM_WRITE_OPCODE_SPI; ret_val = igb_ready_nvm_eeprom(hw); if (ret_val) goto release; igb_standby_nvm(hw); igb_shift_out_eec_bits(hw, NVM_WREN_OPCODE_SPI, nvm->opcode_bits); igb_standby_nvm(hw); if ((nvm->address_bits == 8) && (offset >= 128)) write_opcode |= NVM_A8_OPCODE_SPI; igb_shift_out_eec_bits(hw, write_opcode, nvm->opcode_bits); igb_shift_out_eec_bits(hw, (u16)((offset + widx) * 2), nvm->address_bits); while (widx < words) { u16 word_out = data[widx]; word_out = (word_out >> 8) | (word_out << 8); igb_shift_out_eec_bits(hw, word_out, 16); widx++; if ((((offset + widx) * 2) % nvm->page_size) == 0) { igb_standby_nvm(hw); break; } } } msleep(10); release: hw->nvm.ops.release(hw); out: return ret_val; }
static void igb_raise_eec_clk(struct e1000_hw *hw, u32 *eecd); static void igb_lower_eec_clk(struct e1000_hw *hw, u32 *eecd); static void igb_shift_out_eec_bits(struct e1000_hw *hw, u16 data, u16 count); static u16 igb_shift_in_eec_bits(struct e1000_hw *hw, u16 count); static s32 igb_poll_eerd_eewr_done(struct e1000_hw *hw, int ee_reg); s32 igb_acquire_nvm(struct e1000_hw *hw); static void igb_standby_nvm(struct e1000_hw *hw); static void e1000_stop_nvm(struct e1000_hw *hw); void igb_release_nvm(struct e1000_hw *hw); static s32 igb_ready_nvm_eeprom(struct e1000_hw *hw); s32 igb_read_nvm_eerd(struct e1000_hw *hw, u16 offset, u16 words, u16 *data); s32 igb_read_part_string(struct e1000_hw *hw, u8 *part_num, u32 part_num_size); s32 igb_read_mac_addr(struct e1000_hw *hw); s32 igb_validate_nvm_checksum(struct e1000_hw *hw); s32 igb_update_nvm_checksum(struct e1000_hw *hw);
d4856c21e01f3d813339ae9c9912f794320caf7144138461733d66157ea737e7
1,267
tb24
liblderive
src/HLSystem.c
makeHDirectiveSeed
struct HDirective* makeHDirectiveSeed(int seed, YYLTYPE locations) { struct HDirective * hd = malloc(sizeof(*hd)); hd->hdType = dSEED; hd->hdData.hddRandomSeed = seed; return hd; }
HId* makeHId(char* str, YYLTYPE location); HId* makePreDefId(PreDefModTypes mt, YYLTYPE location); void freeHId(HId* hid); union HVEArgs* BinaryArgs(struct HValExp* e1, struct HValExp* e2); struct HValExp* BinaryExp(ops_t type, union HVEArgs* args, YYLTYPE locations); struct HValExp* IdExp(HId* id, YYLTYPE locations); struct HValExp* RealExp(float val, YYLTYPE locations); struct HValExp* BoolExp(bool val, YYLTYPE locations); struct HModRef* makeHModRef(HId* refName, HId** paramRefs, YYLTYPE locations); struct HDirective* makeHDirectiveDefine(struct HVarDec* hvd, YYLTYPE locations); HVarDec* makeHVarDec(HId* varId, struct HValExp* varExp, YYLTYPE locations); struct HDirective* makeHDirectiveConsider(struct HModExp** hmes, YYLTYPE locations); struct HDirective* makeHDirectiveIgnore(struct HModExp** hmes, YYLTYPE locations); struct HDirective* makeHDirectiveAxiom(struct HModExp** hmes, YYLTYPE locations); struct HDirective* makeHDirectiveDepth(int depth, YYLTYPE locations); struct HDirective* makeHDirectiveLength(int length, YYLTYPE locations); HModExp* makeHModExp(HId* modName, HValExp** modValExps, YYLTYPE locations); void ppLSystem(struct HLSystem* lsys); void ppLRule(struct HLRule* lr); void ppHModRefs(struct HModRef** hmes); void ppHModRef(struct HModRef* hmr); void ppHId(HId* param); void ppDirectives(struct HDirective** hd); void ppDirective(struct HDirective* dir); void ppHModExps(struct HModExp** mes); void ppHValExp(struct HValExp* hve); void ppHValExps(struct HValExp** hves); void ppOp(ops_t op); void ppBinaryOperator(ops_t op, union HVEArgs* args); void hlsys_free(HLSystem* hls); void freeHLsys(struct HLSystem* hls); void freeHDirs(struct HDirective ** hds); void freeHDir(struct HDirective* hd); void freeHLRules(struct HLRule ** hlrs); void freeHLRule(struct HLRule* hlr); void freeHVardec(struct HVarDec* hvd); void freeHModRef(struct HModRef* hmr); void freeHModExps(struct HModExp ** mes); void freeHModExp(struct HModExp* hme); void freeHValExps(struct HValExp ** hves); void freeHValExp(struct HValExp* hve); void freeHValExpBinaryArgs(union HVEArgs* hveargs); void freeHValExpUnaryArgs(union HVEArgs* hveargs);
8c62e840cf5a74a188cbdcf97fcc664b876410beb42f795d38cac86af0ee9581
189
Jackeagle
android_kernel_sony_c2305
drivers/video/intelfb/intelfbdrv.c
intelfb_pan_display
static int intelfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) { intelfbhw_pan_display(var, info); return 0; }
static __inline__ char * get_opt_string(const char *this_opt, const char *name); static __inline__ int get_opt_int(const char *this_opt, const char *name, int *ret); static __inline__ int get_opt_bool(const char *this_opt, const char *name, int *ret); static int __init intelfb_setup(char *options); static int __init intelfb_init(void); static void __exit intelfb_exit(void); static inline void __devinit set_mtrr(struct intelfb_info *dinfo); static inline void unset_mtrr(struct intelfb_info *dinfo); static void cleanup(struct intelfb_info *dinfo); static int __devinit intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent); static void __devexit intelfb_pci_unregister(struct pci_dev *pdev); int __inline__ intelfb_var_to_depth(const struct fb_var_screeninfo *var); static __inline__ int var_to_refresh(const struct fb_var_screeninfo *var); static void __devinit get_initial_mode(struct intelfb_info *dinfo); static int __devinit intelfb_init_var(struct intelfb_info *dinfo); static int __devinit intelfb_set_fbinfo(struct intelfb_info *dinfo); static void update_dinfo(struct intelfb_info *dinfo, struct fb_var_screeninfo *var); static int intelfb_open(struct fb_info *info, int user); static int intelfb_release(struct fb_info *info, int user); static int intelfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info); static int intelfb_set_par(struct fb_info *info); static int intelfb_blank(int blank, struct fb_info *info); static int intelfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg); static void intelfb_fillrect (struct fb_info *info, const struct fb_fillrect *rect); static void intelfb_copyarea(struct fb_info *info, const struct fb_copyarea *region); static void intelfb_imageblit(struct fb_info *info, const struct fb_image *image); static int intelfb_cursor(struct fb_info *info, struct fb_cursor *cursor); static int intelfb_sync(struct fb_info *info);
7ba9898fd94014a3556979105590804dcaa88539842a83a6f613d41a66206b4b
149
Core2idiot
Kernel-Samsung-3.0...-
drivers/acpi/acpi_pad.c
acpi_pad_idlepct_show
static ssize_t acpi_pad_idlepct_show(struct device *dev, struct device_attribute *attr, char *buf) { <<<<<<< HEAD return scnprintf(buf, PAGE_SIZE, "%d\n", idle_pct); ======= return scnprintf(buf, PAGE_SIZE, "%d", idle_pct); >>>>>>> 296c66da8a02d52243f45b80521febece5ed498a }
static void round_robin_cpu(unsigned int tsk_index); static void exit_round_robin(unsigned int tsk_index); static int power_saving_thread(void *data); static int create_power_saving_task(void); static void destroy_power_saving_task(void); static void set_power_saving_task_num(unsigned int num); static void acpi_pad_idle_cpus(unsigned int num_cpus); static uint32_t acpi_pad_idle_cpus_num(void); static int acpi_pad_add_sysfs(struct acpi_device *device); static void acpi_pad_remove_sysfs(struct acpi_device *device); static int acpi_pad_pur(acpi_handle handle, int *num_cpus); static int acpi_pad_add(struct acpi_device *device); static int __init acpi_pad_init(void); static void __exit acpi_pad_exit(void);
552d7a6737a29c933b3588546141cf0e3f5a010933f742a57aae22291cfe0861
278
google-code-export
lxpanelx
src/plugins/taskbar/taskbar.c
preview_panel_leave
static gboolean preview_panel_leave(GtkWidget * widget, GdkEvent * event, TaskbarPlugin * tb) { taskbar_check_hide_popup(tb); return FALSE; }
static void set_timer_on_task(Task * tk); static int taskbar_get_task_button_max_width(TaskbarPlugin * tb); static gboolean taskbar_task_button_is_expandable(TaskbarPlugin * tb); static gchar* taskbar_get_desktop_name(TaskbarPlugin * tb, int desktop, const char* defval); static gboolean taskbar_has_visible_tasks_on_desktop(TaskbarPlugin * tb, int desktop); static int task_class_is_folded(TaskbarPlugin * tb, TaskClass * tc); static char* task_get_displayed_name(Task * tk); static gchar* task_get_desktop_name(Task * tk, const char* defval); static int task_is_folded(Task * tk); static gboolean task_has_visible_close_button(Task * tk); static gboolean task_is_visible_on_desktop(Task * tk, int desktop); static gboolean task_is_visible_on_current_desktop(Task * tk); static gboolean task_is_visible(Task * tk); static int task_button_is_really_flat(Task * tk); static void taskbar_notify_panel_class_visibility_changed(TaskbarPlugin * tb, gboolean force); static void taskbar_recompute_fold_by_count(TaskbarPlugin * tb); static void recompute_group_visibility_for_class(TaskbarPlugin * tb, TaskClass * tc); static void recompute_group_visibility_on_current_desktop(TaskbarPlugin * tb); static void taskbar_update_x_window_position(TaskbarPlugin * tb); static void task_draw_label(Task * tk); static void task_button_redraw_button_state(Task * tk, TaskbarPlugin * tb); static gboolean task_adapt_to_allocated_size(Task * tk); static void task_button_redraw(Task * tk); static void taskbar_redraw(TaskbarPlugin * tb); static gboolean accept_net_wm_state(NetWMState * nws); static gboolean accept_net_wm_window_type(NetWMWindowType * nwwt); static void task_free_names(Task * tk); static void task_set_names(Task * tk, Atom source); static void task_unlink_class(Task * tk); static TaskClass * taskbar_enter_class(TaskbarPlugin * tb, char * class_name, gboolean * name_consumed); static gchar* task_read_wm_class(Task * tk); static void task_update_wm_class(Task * tk); static void task_set_class(Task * tk); static void task_set_override_class(Task * tk, char * class_name); static Task * task_lookup(TaskbarPlugin * tb, Window win); static void task_delete(TaskbarPlugin * tb, Task * tk, gboolean unlink); static gboolean task_update_thumbnail_preview_real(Task * tk); static void task_update_thumbnail_preview(Task * tk); static gboolean task_update_composite_thumbnail_real(Task * tk); static gboolean task_update_composite_thumbnail_timeout(Task * tk); static void task_update_composite_thumbnail(Task * tk); static gboolean task_update_bgcolor_idle(Task * tk); static GdkPixbuf * get_window_icon(Task * tk, int icon_size, Atom source); static void task_create_icons(Task * tk, Atom source, int icon_size); static void task_update_icon(Task * tk, Atom source, gboolean forse_icon_erase); static gboolean task_update_icon_cb(Task * tk); static void task_defer_update_icon(Task * tk, gboolean forse_icon_erase); static gboolean flash_window_timeout(Task * tk); static void task_set_urgency(Task * tk); static void task_clear_urgency(Task * tk); static void taskbar_group_menu_destroy(TaskbarPlugin * tb); static void task_show_window_list_helper(Task * tk_cursor, GtkWidget * menu, TaskbarPlugin * tb); static gboolean group_menu_motion(GtkWidget * widget, GdkEvent *event, TaskbarPlugin * tb); static void group_menu_size_allocate(GtkWidget * w, GtkAllocation * alloc, TaskbarPlugin * tb); static void task_show_window_list(Task * tk, GdkEventButton * event, gboolean similar, gboolean menu_opened_as_popup); static void task_close(Task * tk); static void task_iconify(Task * tk); static void task_raiseiconify(Task * tk, GdkEventButton * event); static void task_maximize(Task* tk); static void task_shade(Task * tk); static void task_undecorate(Task * tk); static void task_fullscreen(Task * tk); static void task_stick(Task * tk); static void task_show_menu(Task * tk, GdkEventButton * event, Task* visible_task, gboolean from_popup_menu); static void task_activate_neighbour(Task * tk, GdkEventButton * event, gboolean next, gboolean in_group); static void task_copy_title(Task * tk); static void task_action(Task * tk, int action, GdkEventButton * event, Task* visible_task, gboolean from_popup_menu); static void task_raise(Task * tk, GdkEventButton * event); static gboolean preview_panel_expose_event(GtkWidget *widget, GdkEventExpose *event, TaskbarPlugin * tb); static void preview_panel_setup_rgba_transparency(TaskbarPlugin * tb); static gboolean preview_panel_configure_event (GtkWidget *widget, GdkEventConfigure *e, TaskbarPlugin * tb); static void preview_panel_size_allocate(GtkWidget * w, GtkAllocation * alloc, TaskbarPlugin * tb); static gboolean preview_panel_enter(GtkWidget * widget, GdkEvent * event, TaskbarPlugin * tb); static gboolean preview_panel_press_event(GtkWidget * widget, GdkEventButton * event, Task * tk); static void preview_panel_calculate_speed(TaskbarPlugin * tb, int window_left, int window_right); static gboolean preview_panel_motion_timer(TaskbarPlugin * tb); static gboolean preview_panel_motion_event(GtkWidget * widget, GdkEventMotion * event, TaskbarPlugin * tb); static void taskbar_build_preview_panel(TaskbarPlugin * tb); static void taskbar_hide_preview_panel(TaskbarPlugin * tb); static void task_update_preview_item(Task * tk, gboolean create); static void _remove_from_container(GtkWidget * widget, gpointer data); static void task_show_preview_panel(Task * tk); static void taskbar_check_hide_popup(TaskbarPlugin * tb); static void taskbar_show_popup(Task * tk); static void taskbar_hide_popup(TaskbarPlugin * tb); static void taskbar_hide_popup_timeout(TaskbarPlugin * tb); static void taskbar_popup_set_position(GtkWidget * menu, gint * px, gint * py, gboolean * push_in, gpointer data); static void debug_print_tasklist(Task * tk, char * text); static gboolean taskbar_button_motion_notify_event(GtkWidget * widget, GdkEventMotion * event, Task * tk); static gboolean taskbar_task_control_event(GtkWidget * widget, GdkEventButton * event, Task * tk, gboolean popup_menu); dget, GdkEventButton * event, Task * tk); widget, GdkEventButton * event, Task * tk); widget, GdkEventButton * event, Task * tk); tk); dget, GdkDragContext * drag_context, gint x, gint y, guint time, Task * tk); GdkDragContext * drag_context, guint time, Task * tk); taskbar_show_popup(tk); * tk); * tk); idget, GdkEventScroll * event, Task * tk); GtkAllocation * alloc, Task * tk); * btn, GtkAllocation * alloc, Task * tk); GtkAllocation * alloc, Task * tk); GtkOrientation bo = (plugin_get_orientation(tb->plug); tb); * tk); b, Task* tk); ew); askbarPlugin * tb); Window f); b, int desktop); Plugin * tb); t, TaskbarPlugin * tb); dget, TaskbarPlugin * tb); TaskbarPlugin * tb); n result = FALSE; XWMHints * hints = (XWMHints *); rPlugin * tb); tb, XEvent *ev); GdkEvent * event, TaskbarPlugin * tb); Plugin * tb); arPlugin * tb); barPlugin * tb); arPlugin * tb); lugin * tb); skbarPlugin * tb); skbarPlugin * tb); t, TaskbarPlugin * tb); arPlugin * tb); rPlugin * tb); ter p); skbarPlugin * tb); TaskbarPlugin * tb); skbarPlugin * tb); ugin * tb); n * tb); Plugin * tb); , gpointer d); *widget, gpointer data); gtk_menu_item_set_submenu(GTK_MENU_ITEM(tk->tb->move_to_group_menuitem); an value); ame); up_menu); har * name, GCallback activate_cb, GtkWidget ** menuitem, gboolean hide_inactive); * Deallocate old menu if present. */ if (tb->menu != NULL); reen, TaskbarPlugin * tb); ugin * tb = PRIV(p); if (!tb->show_iconified); atom_LXPANEL_TASKBAR_WINDOW_POSITION = XInternAtom( gdk_x11_get_default_xdisplay(); lugin * tb = PRIV(p); TaskbarPlugin * tb = PRIV(p); ent); fp); p); * tb, int position); ** argv, int argc); int argc); in * p, const char * class_name);
27015f7e4d91a77129d276d1fcc5075e2e6e317ac248f07f7236973a73b26e4a
150
rex-xxx
mt6572_x201
mediatek/external/autofm/autofm.c
fm_write_reg
static int fm_write_reg(struct fm_cmd *cmd) { int ret; int tmp; struct fm_ctl_parm parm; if(g_fm_fd < 0){ printf("WARN fd unavailable\n"); return -2; } bzero(&parm, sizeof(struct fm_ctl_parm)); ret = get_int_val(cmd->para[0], &tmp); if(ret){ return -1; } parm.addr = (uint8_t)tmp; ret = get_int_val(cmd->para[1], &tmp); if(ret){ return -1; } parm.val = (uint16_t)tmp; parm.rw_flag = 0; ret = ioctl(g_fm_fd, FM_IOCTL_RW_REG, &parm); if(ret){ printf("FAIL:%d:%d\n", ret, parm.err); return -1; } printf("OK: 0x%02x = 0x%04x\n", parm.addr, parm.val); return 0; }
static int to_upper(char *str); static int to_upper_n(char *str, int len); static int check_hex_str(char *str, int len); static int check_hex_str(char *str, int len); static int check_dec_str(char *str, int len); static int ascii_to_hex_u32(char *in_ascii, uint32_t *out_hex); static int ascii_to_hex(char *in_ascii, uint16_t *out_hex); static int ascii_to_dec_u32(char *in_ascii, uint32_t *out_dec); static int ascii_to_dec(char *in_ascii, int *out_dec); static int trim_string(char **start); static int trim_path(char **start); static int cmd_parser(char *src, char **new_pos, char **word); static int get_cmd(char *buf, int buf_size); static int fm_open_dev(struct fm_cmd *cmd); static int fm_close_dev(struct fm_cmd *cmd); static int fm_power_up(struct fm_cmd *cmd); static int fm_power_up_tx(struct fm_cmd *cmd); static int fm_power_down(struct fm_cmd *cmd); static int fm_rds_on_off(struct fm_cmd *cmd); static int get_int_val(char *src_val, int *dst_val); static int get_u32_val(char *src_val, uint32_t *dst_val); static int fm_tune(struct fm_cmd *cmd); static int fm_stdsrc_set(struct fm_cmd *cmd); static int fm_tune_tx(struct fm_cmd *cmd); static int fm_rds_tx(struct fm_cmd *cmd); static int fm_seek(struct fm_cmd *cmd); static int fm_scan(struct fm_cmd *cmd); static int fm_jammer_scan(struct fm_cmd *cmd); static int fm_getcqi(struct fm_cmd *cmd); static int fm_scan_force_stop(struct fm_cmd *cmd); static int fm_seek_all(struct fm_cmd *cmd); static int fm_mute(struct fm_cmd *cmd); static int fm_unmute(struct fm_cmd *cmd); static int fm_setvol(struct fm_cmd *cmd); static int fm_getvol(struct fm_cmd *cmd); static int fm_getrssi(struct fm_cmd *cmd); static int fm_32kppm_compensation(struct fm_cmd *cmd); static int fm_i2s_set(struct fm_cmd *cmd); static int fm_over_bt(struct fm_cmd *cmd); static int fm_read_reg(struct fm_cmd *cmd); static int print_page(uint16_t page, int mode); static int fm_print_reg(struct fm_cmd *cmd); static int fm_mod_reg(struct fm_cmd *cmd); static int fm_delay(struct fm_cmd *cmd); static int fm_help(struct fm_cmd *cmd); static int fm_bye(struct fm_cmd *cmd); static enum fm_event_type get_key_type(char *key, struct fm_cmd **pcmd); static int daemonize(int argc, char **argv); static int fm_top_read_reg(struct fm_cmd *cmd); static int fm_top_write_reg(struct fm_cmd *cmd); static int fm_host_read_reg(struct fm_cmd *cmd); static int fm_host_write_reg(struct fm_cmd *cmd); int main(int argc, char **argv);
f26a8a047cde69857a0b0bc65fcc300f14c8666888cb930efebeb75d622575b1
692
mgood7123
UPM
GDB/Experiments/perl/vutil.c
if
else if (SvIOKp(ver)) { goto VER_IV; }
Perl_new_version2(pTHX_ SV *ver); else if ( (mg = SvVSTRING_mg(ver); else if (SvNOKp(ver); else if (SvPOKp(ver); Perl_vverify2(pTHX_ SV *vs); Perl_vnumify2(pTHX_ SV *vs); Perl_vnormal2(pTHX_ SV *vs); Perl_vstringify2(pTHX_ SV *vs);
4fc315ac6a3deea894e111fc3c556a4f2fd39537ec60585b404c73d679ecd139
44
DavidUser
Energia
hardware/c2000/cores/c2000/wiring_digital.c
digitalRead
int digitalRead(uint8_t pin) { uint16_t gpio_number = pin_mapping[pin]; uint32_t bit = digitalPinToBitMask(gpio_number); uint32_t port = digitalPinToPort(gpio_number); if(gpio_number & 0x8000) { gpio_number &= 0x7FFF; if(GpioDataRegs.AIODAT.all & (1UL << gpio_number)) return HIGH; else return LOW; } else { if (port == NOT_A_PORT) return LOW; if (*portInputRegister(port) & bit) return HIGH; else return LOW; } }
void pinMode(uint8_t pin, uint8_t mode); void pinMode_int(uint8_t pin, uint8_t mode); void digitalWrite(uint8_t pin, uint8_t val);
7e3f0c43466f4af28bfecc2620c79c8a5c7a267de994de4c44eb9648a4319767
560
n-soda
linux
net/netlink/af_netlink.c
netlink_broadcast
void netlink_broadcast(struct sock *ssk, struct sk_buff *skb, u32 pid, u32 group, int allocation) { struct netlink_broadcast_data info; struct sock *sk; info.exclude_sk = ssk; info.pid = pid; info.group = group; info.failure = 0; info.allocation = allocation; info.skb = skb; info.skb2 = NULL; netlink_lock_table(); for (sk = nl_table[ssk->protocol].mc_list; sk; sk = sk->bind_next) do_one_broadcast(sk, &info); netlink_unlock_table(); if (info.skb2) kfree_skb(info.skb2); kfree_skb(skb); }
static struct sock **nl_pid_hashfn(struct nl_pid_hash *hash, u32 pid); static void netlink_sock_destruct(struct sock *sk); static void netlink_table_grab(void); static __inline__ void netlink_table_ungrab(void); sock *netlink_lookup(int protocol, u32 pid); static inline struct sock **nl_pid_hash_alloc(size_t size); static inline void nl_pid_hash_free(struct sock **table, size_t size); static int nl_pid_hash_rehash(struct nl_pid_hash *hash, int grow); static inline int nl_pid_hash_dilute(struct nl_pid_hash *hash, int len); static int netlink_insert(struct sock *sk, u32 pid); static void netlink_remove(struct sock *sk); static int netlink_create(struct socket *sock, int protocol); static int netlink_release(struct socket *sock); static int netlink_autobind(struct socket *sock); static inline int netlink_capable(struct socket *sock, unsigned int flag); static int netlink_bind(struct socket *sock, struct sockaddr *addr, int addr_len); static int netlink_getname(struct socket *sock, struct sockaddr *addr, int *addr_len, int peer); static void netlink_overrun(struct sock *sk); int netlink_unicast(struct sock *ssk, struct sk_buff *skb, u32 pid, int nonblock); static __inline__ int netlink_broadcast_deliver(struct sock *sk, struct sk_buff *skb); void netlink_set_err(struct sock *ssk, u32 pid, u32 group, int code); static inline void netlink_rcv_wake(struct sock *sk); void netlink_data_ready(struct sock *sk, int len); void netlink_set_nonroot(int protocol, unsigned int flags); static void netlink_destroy_callback(struct netlink_callback *cb); static int netlink_dump(struct sock *sk); void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err); int netlink_attach(int unit, int (*function); void netlink_detach(int unit); int netlink_post(int unit, struct sk_buff *skb); int netlink_register_notifier(struct notifier_block *nb); int netlink_unregister_notifier(struct notifier_block *nb); int __init netlink_proto_init(void); static void __exit netlink_proto_exit(void);
721f36878e5abf7873c00d16b9b3ae3e822d3f5a26f72df247f257082787ea68
527
jcupitt
gegl-vips
operations/common/snn-mean.c
gboolean process
tic gboolean process (GeglOperation *operation, GeglBuffer *input, GeglBuffer *output, const GeglRectangle *result) { GeglChantO *o = GEGL_CHANT_PROPERTIES (operation); GeglBuffer *temp_in; GeglRectangle compute; compute = gegl_operation_get_required_for_output ( operation, "input", result); if (o->radius < 1.0) { output = g_object_ref (input); } else { temp_in = gegl_buffer_create_sub_buffer (input, &compute); snn_mean (temp_in, output, result, o->radius, o->pairs); g_object_unref (temp_in); } return TRUE; } #d
tic void prepare (GeglOperation *operation); tic inline gfloat rgb2luminance (gfloat *pix); tic inline gfloat colordiff (gfloat *pixA, gfloat *pixB); tic void gegl_chant_class_init (GeglChantClass *klass);
5354a100eceeceb6605da1e5f59cbbf1a42df9e86d50b781f764db9028b64ea0
673
XMelancholy
android_kernel_huawei_h60
drivers/vendor/hisi/modem/drv/ccore/drivers/sci/sci_balong.c
sci_print_error
sci_print_error("bsp_sci_clk_status_cfg: Open SIM Clock Stop Mode Failure.lSciErroRet = %ld.\r\n\n",\ (int)lSciErroRet,0,0,0,0,0); SCI_RECORD_EVENT(SCI_EVENT_BEYOND_LOG, pstrState->eCurrentState, __LINE__); return lSciErroRet; } if (OK != semTake(g_SCIClockStopSem, 100)) { sci_print_error("bsp_sci_clk_status_cfg:wait clock stop interrupt error!\n"); return BSP_OK; } g_ulSciClkTimeStpFlag = apPL131_CLOCK_STOP; pwrctrl_sci_soft_clk_dis(); pwrctrl_sci_low_power_enter(); SCI_RECORD_EVENT(SCI_EVENT_LOW_POWER_ENTER, pstrState->eCurrentState, __LINE__); } SCI_RECORD_EVENT(SCI_EVENT_BEYOND_LOG, lSciErroRet, __LINE__); return lSciErroRet; } s32 bsp_sci_excreset_times(u32 ExcResetTimes) { if (ExcResetTimes > 6) { sci_print_error("Set ExcResetTimes(%d) > 6 %d",ExcResetTimes,0,0,0,0,0); return BSP_ERR_SCI_INVALIDPARA; } g_SciExcResetTimes = ExcResetTimes; return BSP_OK; } u32 bsp_sci_record_data_save() { return sci_record_data_save(); } /***************************************************************************** * º¯ Êý Ãû : bsp_sci_record_log_read * * ¹¦ÄÜÃèÊö : ±¾½Ó¿Ú»ñÈ¡sim¿¨Ò쳣ʱ¶¨Î»ÐÅÏ¢ * ÊäÈë²ÎÊý : pu
FSET, SCI1_CLK_SET_BIT_SHIFT, 1, 1); SCI1_CLK_SET_BIT_SHIFT, 1, 1); .card_id,result,__LINE__,0,0,0); ,result,__LINE__,0,0,0); if (!g_SCIRecvSyncSem); byte\n"); ; ; th); ; ; ; { if(g_sci_detect_state == SIM_CARD_LEAVE); G, pstrState->eCurrentState, __LINE__); ResetSuccess != SCI_DEF_RESET_SUCCESS); Length; ulLoopIndex++); State, __LINE__); rror("don't support CLASS_B\n"); on != SCI_VOLTAGE_SWITCH_CLASS_ZERO2CB); ; ; = PL131_SCI_Class_C);
4cf66e3a206246dac4a2b4a9aee93e5c665406bc628940e73246a8d6802e1d2b
1,458
BramBonne
snoopsnitch-pcapinterface
contrib/libosmo-asn1-rrc/src/InterRAT-UE-RadioAccessCapability-v690ext.c
asn_enc_rval_t supportOfInter_RAT_PS_Handover_2_encode_der
static asn_enc_rval_t supportOfInter_RAT_PS_Handover_2_encode_der(asn_TYPE_descriptor_t *td, void *structure, int tag_mode, ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, void *app_key) { supportOfInter_RAT_PS_Handover_2_inherit_TYPE_descriptor(td); return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); }
58bec0b090d81c83d8d5d094caf8bc3b9d9a7e0c4403f1471f3d06a42988a1d0
326
hugh712
my_driver_study
Jollen/jk2410/kernel-jk2410/drivers/block/paride/pt.c
pt_init
int pt_init (void) { int unit; if (disable) return -1; pt_init_units(); if (pt_detect()) return -1; if (devfs_register_chrdev(major,name,&pt_fops)) { printk("pt_init: unable to get major number %d\n", major); for (unit=0;unit<PT_UNITS;unit++) if (PT.present) pi_release(PI); return -1; } devfs_handle = devfs_mk_dir (NULL, "pt", NULL); devfs_register_series (devfs_handle, "%u", 4, DEVFS_FL_DEFAULT, major, 0, S_IFCHR | S_IRUSR | S_IWUSR, &pt_fops, NULL); devfs_register_series (devfs_handle, "%un", 4, DEVFS_FL_DEFAULT, major, 128, S_IFCHR | S_IRUSR | S_IWUSR, &pt_fops, NULL); return 0; }
void pt_setup( char *str, int *ints); void pt_init_units( void ); void cleanup_module(void); static int pt_wait( int unit, int go, int stop, char * fun, char * msg ); static int pt_command( int unit, char * cmd, int dlen, char * fun ); static int pt_completion( int unit, char * buf, char * fun ); static void pt_req_sense( int unit, int quiet ); static int pt_atapi( int unit, char * cmd, int dlen, char * buf, char * fun ); static void pt_sleep( int cs ); static int pt_poll_dsc( int unit, int pause, int tmo, char *msg ); static void pt_media_access_cmd( int unit, int tmo, char *cmd, char *fun); static void pt_rewind( int unit ); static void pt_write_fm( int unit ); static int pt_reset( int unit ); static int pt_ready_wait( int unit, int tmo ); static void xs( char *buf, char *targ, int offs, int len ); static int xn( char *buf, int offs, int size ); static int pt_identify( int unit ); static int pt_probe( int unit ); static int pt_detect( void ); static int pt_open (struct inode *inode, struct file *file); static int pt_release (struct inode *inode, struct file *file);
5008864d4fa84ecb69ad87cc86c9c2437f2aa5e6df8c4d906bb3978794c8b78e
749
CyanogenMod
android_kernel_sony_msm7x27a
drivers/input/touchscreen/ektf2k.c
elan_iap_read
ssize_t elan_iap_read(struct file *filp, char *buff, size_t count, loff_t *offp){ char *tmp; int ret; long rc; #if DEBUG printk("[ELAN]into elan_iap_read\n"); #endif if (count > 8192) count = 8192; tmp = kmalloc(count, GFP_KERNEL); if (tmp == NULL) return -ENOMEM; ret = i2c_master_recv(private_ts->client, tmp, count); if (ret >= 0) rc = copy_to_user(buff, tmp, count); kfree(tmp); return ret; }
int elan_iap_open(struct inode *inode, struct file *filp); int elan_iap_release(struct inode *inode, struct file *filp); ssize_t elan_iap_write(struct file *filp, const char *buff, size_t count, loff_t *offp); static long elan_iap_ioctl(/*struct inode *inode,*/ struct file *filp, unsigned int cmd, unsigned long arg); static int elan_ktf2k_touch_sysfs_init(void); static void elan_touch_sysfs_deinit(void); static int __elan_ktf2k_ts_poll(struct i2c_client *client); static int elan_ktf2k_ts_poll(struct i2c_client *client); static int __hello_packet_handler(struct i2c_client *client); static int __fw_packet_handler(struct i2c_client *client); static int elan_ktf2k_ts_setup(struct i2c_client *client); static int elan_ktf2k_ts_set_power_state(struct i2c_client *client, int state); static int elan_ktf2k_ts_get_power_state(struct i2c_client *client); static int elan_ktf2k_ts_recv_data(struct i2c_client *client, uint8_t *buf); static void elan_ktf2k_ts_report_data(struct i2c_client *client, uint8_t *buf); static void elan_ktf2k_ts_work_func(struct work_struct *work); static irqreturn_t elan_ktf2k_ts_irq_handler(int irq, void *dev_id); static irqreturn_t elan_home_key_isr(int irq, void *dev_id); static void elan_home_key_irq_work_queue_func(struct work_struct *work); static int elan_ktf2k_ts_register_interrupt(struct i2c_client *client); static void ts_timer(unsigned long arg); static int elan_ktf2k_ts_remove(struct i2c_client *client); static int elan_ktf2k_ts_suspend(struct i2c_client *client, pm_message_t mesg); static int elan_ktf2k_ts_resume(struct i2c_client *client); static void elan_ktf2k_ts_early_suspend(struct early_suspend *h); static void elan_ktf2k_ts_late_resume(struct early_suspend *h); static int __devinit elan_ktf2k_ts_init(void); static void __exit elan_ktf2k_ts_exit(void);
f436f9da3c5e31524be887a18b1af05c72735c7fb9b02797862cf499f823b722
490
553406268
vsprog
vsf/example/MSCBoot/main.c
MalEraseWrite
static vsf_err_t MalEraseWrite(struct dal_info_t *info, uint32_t addr, uint8_t *buff, uint32_t page_size) { struct mal_info_t *mal_info = (struct mal_info_t *)info->extra; uint32_t mal_pagesize = (uint32_t)mal_info->capacity.block_size; uint32_t mal_pagenum = (uint32_t)mal_info->capacity.block_number; if ((0 == mal_pagesize) || (page_size < mal_pagesize) || (addr >= (mal_pagesize * mal_pagenum))) { return VSFERR_FAIL; } mal_io_curcnt = 0; mal_io_cnt = page_size / mal_pagesize; mal_io_fsm = MAL_IO_ERASE; mal.eraseblock_nb_start(info, addr, mal_io_cnt); return mal.eraseblock_nb(info, addr); }
static vsf_err_t ReadAppCfg(struct app_cfg_t *cfg); static vsf_err_t WriteAppCfg(struct app_cfg_t *cfg); static void fatal_error(void); int main(void);
faa8c7df7956cef5f6691b3ce65e2adb6f37c49657e574afc8c1d57b26f4705d
643
553406268
vsprog
src/target/svf_player/svf_parser.c
svf_parser_get_command
vsf_err_t svf_parser_get_command(FILE *file, char **cmd_buffer, uint32_t *cmd_len) { char *tmp_buffer = NULL; uint32_t cmd_pos = 0; char ch; uint8_t comment = 0, slash = 0, cmd_ok = 0; while (!feof(file) && !cmd_ok) { ch = (char)fgetc(file); svf_file_index++; switch (ch) { case EOF: break; case '!': slash = 0; comment = 1; break; case '/': if (++slash == 2) { comment = 1; } break; case ';': slash = 0; if (!comment) { cmd_ok = 1; } break; case '\n': svf_line_number++; case '\r': slash = 0; comment = 0; if (!cmd_pos) { break; } default: if (!comment) { if ((cmd_pos + 1) >= *cmd_len) { tmp_buffer = (char*)malloc(*cmd_len + SVFP_CMD_INC_CNT + 1); if (NULL == tmp_buffer) { LOG_ERROR(ERRMSG_NOT_ENOUGH_MEMORY); return VSFERR_NOT_ENOUGH_RESOURCES; } if (*cmd_len > 0) { memcpy(tmp_buffer, *cmd_buffer, *cmd_len); } if (*cmd_buffer != NULL) { free(*cmd_buffer); } *cmd_buffer = tmp_buffer; *cmd_len += SVFP_CMD_INC_CNT; tmp_buffer = NULL; } if ('(' == ch) { (*cmd_buffer)[cmd_pos++] = ' '; } (*cmd_buffer)[cmd_pos++] = (char)toupper(ch); if (')' == ch) { (*cmd_buffer)[cmd_pos++] = ' '; } } break; } } if (cmd_ok) { (*cmd_buffer)[cmd_pos] = '\0'; return VSFERR_NONE; } else { return VSFERR_FAIL; } }
void svf_parser_free_xxd_para(struct svf_xxr_para_t *para); void svf_parser_init(void); void svf_parser_fini(void); vsf_err_t svf_parser_check_tdo(void); vsf_err_t svf_parser_run_command(char *cmd_str);
f5f19dd6af012de784a7025cf6c0decc11ed1c813f4724bcf1a403bbe9be1b58
1,506