Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-bridge/blob/main/tests/cabi/golden/nvmlDeviceGetName.c # omega-bridge Omega-first language interoperability: checked conversion backends and native language bindings Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-bridge / tests / cabi / golden / nvmlDeviceGetName.c` 16 lines ยท 698 bytes Raw Blame History 1 __attribute__((visibility("default"))) nvmlReturn_t nvmlDeviceGetName(nvmlDevice_t device, char *name, unsigned int length){ 2 uint64_t o_f[6]={999},o_d=1;int o_ok=0; 3 if(pthread_mutex_lock(&FxLock))return (nvmlReturn_t)999; 4 o_f[2]=o_hi11(device); 5 o_f[3]=name!=NULL; 6 o_f[5]=(uint64_t)(uint32_t)length; 7 if(!omega_fx_name(&o_d,o_f,6,FxState,8,FxBytes,512)&&!o_d&&o_in2(o_f[0])&&!(o_f[1]&~UINT64_C(1))){ 8 o_ok=1; 9 if(o_f[1]&UINT64_C(1)&&(!name||o_f[4]>(uint64_t)length||o_f[4]>512||!o_f[4]||FxBytes[0+o_f[4]-1]))o_ok=0; 10 } 11 if(o_ok){ 12 if(o_f[1]&UINT64_C(1))memcpy(name,FxBytes+0,o_f[4]); 13 } 14 pthread_mutex_unlock(&FxLock); 15 return o_ok?(nvmlReturn_t)o_f[0]:(nvmlReturn_t)999; 16 }