<commit_before>/*
 * (c) 2008 MOSA - The Managed Operating System Alliance
 *
 * Licensed under the terms of the New BSD License.
 *
 * Authors:
 *  <NAME> (tgiphil) <<EMAIL>>
 */

namespace Mosa.Devices.Kernel
{
    public static class HAL
    {
        /// <summary>
        /// Requests an IO read/write port interface from the kernel
        /// </summary>
        /// <param name="portNbr">The port number.</param>
        /// <returns></returns>
        public static IReadWriteIOPort RequestIOPort(ushort port)
        {
            return new IOPortKernelAdapter(Ensemble.Kernel.BootEntry.ResourceManager.RequestIOPort(port));
        }

        /// <summary>
        /// Disables all interrupts.
        /// </summary>
        public static void DisableAllInterrupts()
        {
            // TODO
        }

        /// <summary>
        /// Enables all interrupts.
        /// </summary>
        public static void EnableAllInterrupts()
        {
            // TODO
        }
    }
}<commit_msg>- Fixed HAL interface<commit_after>/*
 * (c) 2008 MOSA - The Managed Operating System Alliance
 *
 * Licensed under the terms of the New BSD License.
 *
 * Authors:
 *  <NAME> (tgiphil) <<EMAIL>>
 */

namespace Mosa.Devices.Kernel
{
    public static class HAL
    {
        public delegate IReadWriteIOPort CreatePort(ushort port);

        static private CreatePort createPort;

        /// <summary>
        /// Sets the create port method.
        /// </summary>
        /// <param name="createPort">The create port.</param>
        public static void SetCreatePortMethod(CreatePort createPort)
        {
            HAL.createPort = createPort;
        }

        /// <summary>
        /// Requests an IO read/write port interface from the kernel
        /// </summary>
        /// <param name="portNbr">The port number.</param>
        /// <returns></returns>
        public static IReadWriteIOPort RequestIOPort(ushort port)
        {
            return createPort(port);
        }

        /// <summary>
        /// Disables all interrupts.
        /// </summary>
        public static void DisableAllInterrupts()
        {
            // TODO
        }

        /// <summary>
        /// Enables all interrupts.
        /// </summary>
        public static void EnableAllInterrupts()
        {
            // TODO
        }
    }
}

{'fraction_non_alphanumeric': 0.1179225202213708, 'fraction_numerical': 0.0034057045551298426, 'mean_word_length': 1.631578947368421, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6243121', 'n_tokens_mistral': 653, 'n_tokens_neox': 629, 'n_words': 173}