mirror of https://github.com/BOINC/boinc.git
Page:
AppDev
Pages
API Implementation
ATI Radeon
Account managers
AccountControl
AccountManagement
AccountManagers
Adaptive Replication
AdminAlphaTest
AdminApprovedProjects
AdminDepLibs
AdminDepLibsCurl
AdminDepLibsOpenSSL
AdminDepLibsSqlite
AdminDepLibsZlib
AdminInstallerMac
AdminInstallerUnix
AdminInstallerWin
AdminLocalize
AdminReleaseAndroid
AdminReleaseManagement
AdminRoles
AdminTasks
AdminWrappers
Advanced view
AlphaInstructions
AndroidBoinc
AndroidBoincImpl
AndroidBoincTesting
AndroidBoincTodo
AndroidBuildApp
AndroidBuildClient
AndroidBuildStatus
AndroidGuiDiscuss
Anonymous platform
AppCoprocessor
AppDebug
AppDebugAndroid
AppDebugWin
AppDev
AppFiltering
AppIntro
AppLibraries
AppMultiThread
AppPlan
AppPlanSpec
AppVersion
AppVersionNew
Apple Metal Support
AssignedWork
Assimilation introduction
Assimilators in C
Assimilators in scripting languages
AutoFlops
AutoUpdate
BOINC Client
BOINC Data directory
BOINC Help
BOINC Manager
BOINC Security
BOINC screensaver
BOINC apps (introduction)
BOINC community
BOINC events
BOINC overview
BOINC projects
BOINC software development
BOINConPhones
BUDA implementation
BUDA job submission
BUDA overview
BUDA setup
BackendLogic
BackendPrograms
BackendState
BackendUtilities
BadgeDoc
BadgesOld
BashCommandCompletion
BasicApi
BasicConcepts
BerkeleyTasks
BetaTest
BlackList
BoincBasics
BoincContributersCall
BoincDocker
BoincFiles
BoincGovernanceWorkingGroups
BoincIntro
BoincLite
BoincPapers
BoincPlatforms
BoincPmcPage
BoincPr
BoincProjectsCall
BoincSecurity
Boinccmd tool
BuildClientProcedure
BuildMacApp
Building BOINC on Unix
Building BOINC software
CamelCase
CancelJobs
CertSig
Changes to this Wiki
Choosing and joining projects
Client configuration
Client release notes
ClientAppConfig
ClientDataModel
ClientFiles
ClientFsm
ClientLogic
ClientOpaque
ClientSched
ClientSchedOctTen
ClientSchedOld
ClientSchedVersionFour
ClientSetupLogicWin
ClientSetupLogicWinFileLayout
ClientSetupLogicWinSix
ClientSetupLogicWinSixCleanup
ClientSetupWinSix
ClientSim
CloudServer
CodeSigning
CodingStyle
CommIntro
Command line job submission
CompileApp
CompileAppLinux
CompileAppWin
CompileClient
CompileWithWxWidgets
CompoundApps
Computation credit
Computing with BOINC
CondorBoinc
ConferenceList
Contact BOINC
ContributePage
Controlling BOINC remotely
CoreClient
CpuSched
Create a BOINC server (cookbook)
CreateProjectCookbook
Creating a skin for the BOINC Manager
Creating custom installers
CreditAlt
CreditGeneralized
CreditNew
CreditNotes
CreditOptions
CreditProposal
CreditStats
CrossProjectUserId
CudaApps
DataBase
DataFlow
DbDump
DbIds
DbPurge
DebugClientWin
DeleteFile
Deploy Linux apps using VirtualBox (cookbook)
DesignKeywords
DesktopGrid
DevMethodologies
DevProcess
DevProjects
DevProjects_New
DevQualityAssurance
Development_Workflow
DiagnosticsApi
DirHierarchy
DiskManagement
Docker and WSL
Docker app cookbook
Docker app implementation
Docker apps
Docker design alternatives
DownloadInfo
DownloadOther
DrupalConversion
DrupalIntegration
EastCoast08
Editing computing preferences with the BOINC Manager
EmBoinc
EmailChangeNotification
EmailLists
Error handling (cookbook)
Error handling (introduction)
ErrorReference
Error_Abortingtask_Exceededdisklimit
Error_Cantdeletepreviousstatefile
Error_Givinguponupload
Error_Schedulerrequestfailed
ExampleApps
FileCompression
FileDeleter
FileList
FileUpload
FortranApps
Fossils
GPU computing
GPUApp
GSoC_13
GdprCompliance
GetFile
GetFileList
GitMigration
Global prefs override.xml
Going public
GpuSched
GpuSync
GpuWorkFetch
GraphicsApi
GraphicsApiOld
GraphicsApps
GraphicsHtml
GridIntegration
GuiRpc
GuiRpcProtocol
GuiUrls
HTMLGfx
HarzPics
Heat and energy considerations
Home
Homogeneous App Version
Homogeneous Redundancy
Host identification and merging
HostId
HostMeasurement
How BOINC works
HtmlOps
Initialization files
InstallDrupal
Installing BOINC on Debian or Ubuntu
Installing BOINC on EC2
Installing BOINC on Fedora
Installing BOINC on Gentoo
Installing BOINC on Ubuntu
Installing BOINC
Installing on Android
Installing on FreeBSD
Installing on Linux
Installing on MacOS
Installing on Windows
IntermediateUpload
JavaApps
Job processing (cookbook)
Job processing (introduction)
Job replication
JobEst
JobIn
JobIntro
JobKeywords
JobPinning
JobPrioritization
JobReplication
JobSched
JobSizeMatching
JobStage
JobStatus
JobSubmission
JobTemplates
KeySetup
LammpsRemote
LdapSupport
Linux file permissions
Linux DEB and RPM support
Linux installer
LocalityNew
LocalityScheduling
Locating stolen computers
LogExtension
LogRotate
LowLatency
MacBacktrace
MacBuild
MacDeveloper
MacDeveloperProjects
Maintain your BOINC project
MakeProject
ManagerImpl
ManagerMenus
MasterUrl
MediaWiki
MemoryManagement
Missing Linux shared libraries
MpiApps
MultiHost
MultiSize
MultiUser
MultiUserPriority
MysqlConfig
Network related problems
NetworkApps
NonCpuIntensive
Notifications
OpenCL Applications
OpenCL CPU applications
OpenId
OpenclCpu
OptionsApi
OrgGrid
OtherProjectDocs
PMC_Minutes
PMC_Minutes_2017_12_15
PMC_Minutes_2018_01_10
PageTemplates
PasswordHash
PayPalDonations
Per user file sandbox
PerAppCredit
PersFileXfer
PhpDb
PhysicalFileManagement
PlanClassFunc
PortalFeatures
PowerManagement
Preferences
PreferencesXml
Prefs2
PrefsImpl
PrefsOverride
PrefsPresets
PrefsReference
PrefsReference_Time
PrefsRemodel
PrefsUnification
PrepareLinuxBuildMachine
Process_proposals
ProfileScreen
ProjectConfigFile
ProjectDaemons
ProjectDefaults
ProjectGovernance
ProjectLaunch
ProjectMain
ProjectNews
ProjectNotices
ProjectOptions
ProjectPapers
ProjectPlan
ProjectSecurity
ProjectSelect
ProjectSkin
ProjectSpecificPrefs
ProjectSponsors
ProjectTasks
ProofOfOwnership
Proposal_ProjectSimpleAccountCreation
ProtectionFromSpam
Proxy servers
ProxyServer
PyMw
PythonAppDev
PythonApps
PythonFramework
PythonMw
PythonMysql
QuickStart
RecentChanges
Reduce_usage_of_authenticator
Reduce_usage_of_authenticator_implementation
ReleaseNotes
RemoteInputFiles
RemoteJob
RemoteJobs
RemoteLogs
RemoteOutputFiles
RemoteOverview
Reporting client bugs
ResearchProjects
RightToErasure
RpcAuth
RpcPolicy
RpcProtocol
RpmSpec
Running Linux apps on BOINC
RuntimeEstimation
SandBox
SandboxUser
SchedMatch
Scientist interface
ScreensaverEnhancements
ScreensaverLogic
SecureHttp
SecurityIssues
SendFile
Server release notes
Server trouble‐shooting
ServerComponents
ServerDirs
ServerIntro
ServerSecurity
ServerStatus
ServerTestInstructions
ServerUpdates
Simple view
Simple attach usage
SimpleAttach
SingleJob
SingleJobImpl
SkinExamples
SoftwareAddon
SoftwareDevelopment
SoftwarePrereqsUnix
SoftwareTesting
SolarisClient
SolrIntegration
Source code map
SourceCode
SourceCodeGit
SourceCodeGit_Commands
SourceCodeGit_Windows
SourceCodeGit_WindowsKeygen
SourceCodeGit_WorkFlow
SourceCodeSvn
Sporadic Applications
Standard assimilators
Standard validators
StartTool
Starting BOINC on boot (Unix)
StatsXml
StatusApi
StolenComputers
Stop or start BOINC daemon after boot
StripChart
StyleSheets
SuperHost
TeamDiscussion
TeamImport
Teams
TemplateImages
TermsOfUse
The BOINC out of box experience
The BOINC test drive
ToolUpgrade
Tools for MacOS
TranslateIntro
TranslateProject
Translate_Coordination
TranslationSystem
TreeThreader
TrickleApi
TrickleImpl
TrickleMessages
TroubleshootClient
TroubleshootClient_New
Troubleshooting
Tutorial_BOINCApplicationDevelopmentLifecycle
Tutorial_DeployingVMApplications
UnixClientPackage
UnixProjectPackage
UpdateVersions
UploadStatistics
Usage rules
User manual
UserJobs
UserOptInConsent
Using BOINC with modem, ISDN and VPN connections
UsingSvn
ValidationLowLevel
Validators in C
Validators in scripting languages
Validators
VboxApps
Vboxwrapper release notes
VersionDiff
VersionHistory
VersionPathSorter
VirtualBox Plan
VirtualBox
VirtualCampusSupercomputerCenter
VirtualMachines
Virtualbox Shared Directories
VmApps
VmCompatibility
VmServer
Volunteer
VolunteerComputing
VolunteerDataArchival
VolunteerRecruit
VolunteerStorage
WSL apps
WatchDog
Weak account key
WebCache
WebConfig
WebForum
WebResources
WebRpc
WebSubmit
WebTemplateProposal
WhyUseBoinc
WikiTodo
WinMulticore
WindowsIssues
WordPressInt
WorkDistribution
WorkFetchMaxConcurrent
WorkGeneration
WorkShop07
WorkShop07_BoincGrid
WorkShop07_BoincSched
WorkShop07_InterpretedApps
WorkShop07_PubBoincOne
WorkShop07_PubBoincTwo
WorkShop07_SecurityGroup
WorkShop07_SimplifyApp
WorkShop07_Summary
WorkShop07_VirtualMachines
WorkShop07_WebCode
WorkShop08
WorkShop08_WorkshopProceedings
WorkShop09
WorkShop09_BatchSched
WorkShop09_InterprocComm
WorkShop09_ScientistUsability
WorkShop09_UserIssues
WorkShop09_VmApps
WorkShop10
WorkShop10_VmApps
WorkShop10_VolunteerIssues
WorkShop11
WorkShop11_HackFest
WorkShop11_HackFest_Android
WorkShop11_MultiUser
WorkShop12
WorkShop12_WorkshopSummary
WorkShop13
WorkShop13_HackfestNotes
WorkShop14
WorkShop18
WorkShop19
Worker release notes
WorldWideLexicon
Wrapper release notes
WrapperApp
XaddTool
XmlFormat
XmlNotes
XmlStats
test_RunningBoinc
3
AppDev
David Anderson edited this page 2023-08-10 03:26:12 -07:00
Cross-platform utility functions
BOINC supplies various functions that may be useful in applications, such as cross-platform interfaces to operating system features.
Miscellaneous
General functions (in lib/util.cpp/h):
double dtime()
return Unix time with fractional seconds
double dday()
return Unix time at start of this day
void boinc_sleep(double)
sleep for given number of seconds
double drand(), rand_normal()
uniform and normal random numbers
read_file_string(const char* path, string&)
read file into string
File system
File system functions (in lib/filesys.cpp/h):
extern int boinc_delete_file(const char*);
extern int boinc_touch_file(const char *path);
extern FILE* boinc_fopen(const char* path, const char* mode);
extern int boinc_copy(const char* orig, const char* newf);
extern int boinc_rename(const char* old, const char* newf);
extern int boinc_mkdir(const char*);
#ifdef _WIN32
extern int boinc_allocate_file(const char*, double size);
#else
extern int boinc_chown(const char*, gid_t);
#endif
extern int boinc_rmdir(const char*);
extern void boinc_getcwd(char*);
extern void relative_to_absolute(const char* relname, char* path);
extern int is_file(const char* path);
extern int is_dir(const char* path);
extern int is_file_follow_symlinks(const char* path);
extern int is_dir_follow_symlinks(const char* path);
extern int is_symlink(const char* path);
extern bool is_dir_empty(const char*);
extern int boinc_truncate(const char*, double);
extern int boinc_file_exists(const char* path);
extern int boinc_file_or_symlink_exists(const char* path);
extern int file_size(const char*, double&);
extern int clean_out_dir(const char*);
extern int dir_size(const char* dirpath, double&, bool recurse=true);
class DirScanner; // for scanning directories
struct FILE_LOCK; // for locking a file
XML parsing
See lib/parse.cpp,h
String functions
See lib/str_util.h
Cross-platform support for strlcpy(), strlcat(), strcasestr() and strcasecmp() is in lib/str_replace.cpp,h
RSA cryptography
See lib/crypt.cpp,h
MD5 hash
See lib/md5.cpp,h
Semaphores
See lib/synch.cpp,h
Shared memory
See lib/shmem.cpp,h
Network communication
See lib/network.cpp,h
Process control
See lib/proc_control.cpp,h