Second Life source code analysis (forty-four) Virtual File System request processing

Source: Internet
Author: User


In the message queue of the Virtual File System, the Request class is LLVFSThread: Request. The Request class is a nested class, which is defined in the LLVFSThread class. It mainly implements encapsulation access to class LLVFS to make the operation more convenient. Of course, it continues the QueuedRequest class so that it can be added to the message queue, otherwise, it cannot be added to the Message Queue container or implement the polymorphism of request processing.
 
The following is the Request-like constructor.
#001 LLVFSThread: Request (handle_t handle, U32 priority, U32 flags,
#002 operation_t op, LLVFS * vfs,
#003 const LLUUID & file_id, const LLAssetType: EType file_type,
#004 U8 * buffer, S32 offset, S32 numbytes ):
#005 QueuedRequest (handle, priority, flags ),
#006 mOperation (op ),
#007 mVFS (vfs ),
#008 mFileID (file_id ),
#009 mFileType (file_type ),
#010 mBuffer (buffer ),
#011 mOffset (offset ),
#012 mBytes (numbytes ),
#013 mBytesRead (0)
#014 {
#015 llassert (mBuffer );
#016
 
Determine whether an error is invalid.
#017 if (numbytes <= 0 & mOperation! = FILE_RENAME)
#018 & n <

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.