singrdk/base/Contracts/Io.Contracts/VolumeManagerContract.sg

48 lines
1.4 KiB
Plaintext
Raw Normal View History

2008-11-17 18:29:00 -05:00
// ----------------------------------------------------------------------------
2008-03-05 09:52:00 -05:00
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
2008-11-17 18:29:00 -05:00
// ----------------------------------------------------------------------------
2008-03-05 09:52:00 -05:00
using Microsoft.Singularity.Directory;
using Microsoft.Singularity.Channels;
namespace Microsoft.Singularity.Io
{
public contract VolumeManagerContract: ServiceContract
{
in message RegisterDisk(char[]! in ExHeap name);
out message AckRegisterDisk();
out message NakRegisterDisk();
in message DeregisterDisk(char[]! in ExHeap name);
out message AckDeregisterDisk();
out message NakDeregisterDisk();
out message Connect(DiskDeviceContract.Exp:Start! exp, byte systemId, ulong startSector, ulong sectorCount);
in message AckConnect();
in message NakConnect(DiskDeviceContract.Exp:Start exp);
out message Success();
override state Start: one {
Success! -> Ready;
}
state Ready: one
{
RegisterDisk? -> RegisterAck;
}
state RegisterAck: one
{
AckRegisterDisk! -> Accept;
NakRegisterDisk! ;
}
state Accept: one
{
Connect! -> ( AckConnect? or NakConnect?) -> Accept;
}
}
}