Description
The MetaConstructor is the originator of new Factory objects. Factories provide the basic program construction service of the EROS system.
The newly fabricated factory is created in the build state (see the factory concept and Factory pages). The initial state of the newly created factory contain:
| Item | Value |
|---|
| KR3 | A factory copy key to the newly created factory. |
| start address | The initial PC of the factory product (initially 0). |
Operations
- Check Alleged Key Type (OC = KT)
Returns the alleged type of the object.
| Reply | R1 | AKT_MetaConstructor: Key is a metaconstructor key. |
- Create a Factory (OC = 1)
Creates a new factory in the initial state described above, and returns a builder's key to the factory. The process creator of this factory is a newly created process creator.
| Request | SK0 | A prompt space bank. |
| Reply | RK0 | A builder's key to the new factory. |
| Result | RC_OK | Operation completed successfully. |
| RC_NoMoreNodes | Space bank ran out of nodes while creating new factory. All successfully allocated nodes and pages have been returned to the space bank. RK0 is a void key. |
| RC_NoMorePages | Space bank ran out of pages while creating new factory. All successfully allocated nodes and pages have been returned to the space bank. RK0 is a void key. |
- Get Fetcher Key (OC = 8)
Creates a new factoryin the initial state described above, and returns a builder's key to the factory. The process creator of this factory is a newly created process creator.
| Request | SK0 | A requestor's key to a factory created by this factory creator. |
| Reply | RK0 | A fetcher key to the factory designated by SK0. |
| Result | 0 | Mutex ownership granted. |