public boolean hleKernelRegisterCallback(int callbackType,int cbid){
  SceKernelCallbackInfo callback=getCallbackInfo(cbid);
  if (callback == null) {
    log.warn("hleKernelRegisterCallback(type=" + callbackType + ") unknown uid "+ Integer.toHexString(cbid));
    return false;
  }
  SceKernelThreadInfo thread=getThreadById(callback.getThreadId());
  if (thread == null) {
    log.warn("hleKernelRegisterCallback(type=" + callbackType + ") unknown thread uid "+ Integer.toHexString(callback.getThreadId()));
    return false;
  }
  RegisteredCallbacks registeredCallbacks=thread.getRegisteredCallbacks(callbackType);
  if (!registeredCallbacks.addCallback(callback)) {
    return false;
  }
  return true;
}

public boolean hleKernelRegisterCallback ( int callbackType , int cbid ) { SceKernelCallbackInfo callback = getCallbackInfo ( cbid ) ; if ( callback == null ) { log . warn ( "hleKernelRegisterCallback(type=" + callbackType + ") unknown uid " + Integer . toHexString ( cbid ) ) ; return false ; } SceKernelThreadInfo thread = getThreadById ( callback . getThreadId ( ) ) ; if ( thread == null ) { log . warn ( "hleKernelRegisterCallback(type=" + callbackType + ") unknown thread uid " + Integer . toHexString ( callback . getThreadId ( ) ) ) ; return false ; } RegisteredCallbacks registeredCallbacks = thread . getRegisteredCallbacks ( callbackType ) ; if ( ! registeredCallbacks . addCallback ( callback ) ) { return false ; } return true ; }
registers a callback on the thread that created the callback .
