// SDK location: /user/pspthreadman.h:1360 // SDK declaration: int sceKernelCreateFpl(const char *name, int part, int attr, unsigned int size, unsigned int blocks, struct SceKernelFplOptParam *opt); public int sceKernelCreateFpl(int name, int part, int attr, int size, int blocks, int opt) { KPartition partition = _kernel.Partitions[part]; Debug.Assert(partition != null); if (partition == null) { return(-1); } KFixedPool pool = new KFixedPool(_kernel, partition, _kernel.ReadString(( uint )name), ( uint )attr, ( uint )size, blocks); if (pool.AllocateFplBlocks() == false) { pool.Dispose(); //return unchecked( ( int )0x800200E0 ); //return unchecked( ( int )0x800200D9 ); return(unchecked (( int )0x80020190)); } _kernel.AddHandle(pool); // option unused? //Debug.Assert( opt == 0 ); return(( int )pool.UID); }
// SDK location: /user/pspsysmem.h:56 // SDK declaration: SceUID sceKernelAllocPartitionMemory(SceUID partitionid, const char *name, int type, SceSize size, void *addr); public int sceKernelAllocPartitionMemory(int partitionid, int name, int type, int size, int addr) { KPartition partition = _kernel.Partitions[partitionid]; Debug.Assert(partition != null); if (partition == null) { return(-1); } string sname = null; if (name != 0) { sname = _kernel.ReadString(( uint )name); } KMemoryBlock block = partition.Allocate(sname, ( KAllocType )type, ( uint )addr, ( uint )size); Debug.Assert(block != null); if (block == null) { return(-1); } _kernel.AddHandle(block); #if DEBUG _kernel.PrintMemoryInfo(); #endif return(( int )block.UID); }
// manual add public int sceKPartitionTotalFreeMemSize(int partitionid) { KPartition partition = _kernel.Partitions[partitionid]; Debug.Assert(partition != null); if (partition == null) { return(-1); } return(( int )partition.FreeSize); }
// SDK location: /user/pspthreadman.h:1114 // SDK declaration: SceUID sceKernelCreateMsgPipe(const char *name, int part, int attr, void *unk1, void *opt); public int sceKernelCreateMsgPipe(int _name, int part, int attr, int size, int opt) { string name = _kernel.ReadString(( uint )_name); KPartition partition = _kernel.Partitions[part]; Debug.Assert(partition != null); if (partition == null) { return(-1); } KMessagePipe handle = new KMessagePipe(_kernel, partition, name, size); _kernel.AddHandle(handle); Log.WriteLine(Verbosity.Normal, Feature.Bios, "sceKernelCreateMsgPipe: opened pipe {0} with ID {1}, for partition {2:X}", name, handle.UID, part); return(( int )handle.UID); }
// SDK location: /user/pspthreadman.h:1256 // SDK declaration: SceUID sceKernelCreateVpl(const char *name, int part, int attr, unsigned int size, struct SceKernelVplOptParam *opt); public int sceKernelCreateVpl(int name, int part, int attr, int size, int opt) { KPartition partition = _kernel.Partitions[part]; Debug.Assert(partition != null); if (partition == null) { return(-1); } KVariablePool pool = new KVariablePool(_kernel, partition, _kernel.ReadString(( uint )name), ( uint )attr, ( uint )size); _kernel.AddHandle(pool); // option unused? Debug.Assert(opt == 0); return(( int )pool.UID); }