adrianhuang.blogspot.com adrianhuang.blogspot.com

adrianhuang.blogspot.com

Adrian's Blog

What a fascinating Linux it is! Linux Kernel] ACCESS ONCE Macro. 最近看Kernel code,看到這個ACCESS ONCE巨集,仔細看了它的定義發現挺有趣的,順便記錄一下。 ACCESS ONCE顧名思義,就是確實地讀取所指定記憶體位址的內容值,且僅限這一次。所以在這個巨集肯定有volatile關鍵字,其原始定義如下:. Define ACCESS ONCE(x) (*(volatile typeof(x) *)&(x). 底下程式碼擷取於kernel/locking/mutex.c (linux-v4.0-rc1). While (true) { struct task struct *owner; . /* * If there's an owner, wait for it to either * release the lock or go to sleep. */ owner = ACCESS ONCE(lock- owner); if (owner &! 上述程式碼 (存取struct) 可能被編譯器優化 (因為gcc 4&...

http://adrianhuang.blogspot.com/

WEBSITE DETAILS
SEO
PAGES
SIMILAR SITES

TRAFFIC RANK FOR ADRIANHUANG.BLOGSPOT.COM

TODAY'S RATING

>1,000,000

TRAFFIC RANK - AVERAGE PER MONTH

BEST MONTH

December

AVERAGE PER DAY Of THE WEEK

HIGHEST TRAFFIC ON

Tuesday

TRAFFIC BY CITY

CUSTOMER REVIEWS

Average Rating: 4.3 out of 5 with 15 reviews
5 star
9
4 star
3
3 star
2
2 star
0
1 star
1

Hey there! Start your review of adrianhuang.blogspot.com

AVERAGE USER RATING

Write a Review

WEBSITE PREVIEW

Desktop Preview Tablet Preview Mobile Preview

LOAD TIME

0.3 seconds

FAVICON PREVIEW

  • adrianhuang.blogspot.com

    16x16

  • adrianhuang.blogspot.com

    32x32

  • adrianhuang.blogspot.com

    64x64

  • adrianhuang.blogspot.com

    128x128

CONTACTS AT ADRIANHUANG.BLOGSPOT.COM

Login

TO VIEW CONTACTS

Remove Contacts

FOR PRIVACY ISSUES

CONTENT

SCORE

6.2

PAGE TITLE
Adrian's Blog | adrianhuang.blogspot.com Reviews
<META>
DESCRIPTION
What a fascinating Linux it is! Linux Kernel] ACCESS ONCE Macro. 最近看Kernel code,看到這個ACCESS ONCE巨集,仔細看了它的定義發現挺有趣的,順便記錄一下。 ACCESS ONCE顧名思義,就是確實地讀取所指定記憶體位址的內容值,且僅限這一次。所以在這個巨集肯定有volatile關鍵字,其原始定義如下:. Define ACCESS ONCE(x) (*(volatile typeof(x) *)&(x). 底下程式碼擷取於kernel/locking/mutex.c (linux-v4.0-rc1). While (true) { struct task struct *owner; . /* * If there's an owner, wait for it to either * release the lock or go to sleep. */ owner = ACCESS ONCE(lock- owner); if (owner &! 上述程式碼 (存取struct) 可能被編譯器優化 (因為gcc 4&...
<META>
KEYWORDS
1 skip to main
2 skip to sidebar
3 adrian's blog
4 使用情境
5 延伸閱讀
6 最直覺的解法就是存取scalar type的參數,如下所示
7 reference
8 access once
9 張貼者:
10 adrian huang 黃圳柏
CONTENT
Page content here
KEYWORDS ON
PAGE
skip to main,skip to sidebar,adrian's blog,使用情境,延伸閱讀,最直覺的解法就是存取scalar type的參數,如下所示,reference,access once,張貼者:,adrian huang 黃圳柏,沒有留言,formal form,bash reference manual,標籤: bash,shell,standard input,standard output,c語言 兩變數內容值互換技巧,int tmp;,if *a,演算式如下所示,程式說明
SERVER
GSE
CONTENT-TYPE
utf-8
GOOGLE PREVIEW

Adrian's Blog | adrianhuang.blogspot.com Reviews

https://adrianhuang.blogspot.com

What a fascinating Linux it is! Linux Kernel] ACCESS ONCE Macro. 最近看Kernel code,看到這個ACCESS ONCE巨集,仔細看了它的定義發現挺有趣的,順便記錄一下。 ACCESS ONCE顧名思義,就是確實地讀取所指定記憶體位址的內容值,且僅限這一次。所以在這個巨集肯定有volatile關鍵字,其原始定義如下:. Define ACCESS ONCE(x) (*(volatile typeof(x) *)&(x). 底下程式碼擷取於kernel/locking/mutex.c (linux-v4.0-rc1). While (true) { struct task struct *owner; . /* * If there's an owner, wait for it to either * release the lock or go to sleep. */ owner = ACCESS ONCE(lock- owner); if (owner &! 上述程式碼 (存取struct) 可能被編譯器優化 (因為gcc 4&...

INTERNAL PAGES

adrianhuang.blogspot.com adrianhuang.blogspot.com
1

Adrian's Blog: 八月 2011

http://adrianhuang.blogspot.com/2011_08_01_archive.html

What a fascinating Linux it is! 記得大學時, C語言課程一定會談到兩變數內容值互換技巧, 其方法利用暫存空間實現, 如底下程式碼所示:. Void swap(int *a, int *b). Tmp = *a;. 方法一 使用三次互斥或 (Exclusive OR, XOR). Void swap(int *a, int *b). Void swap(int *a, int *b). A = *b = *a = *b;. Printf("= = = before swapping = = = n");. Printf("a: %d, b: %d n", a, b);. Swap(&a, &b);. Printf("= = = after swapping = = = n");. Printf("a: %d, b: %d n", a, b);. 筆者將此C程式碼用gcc編譯成組合語言, 用以了解其運作邏輯, 底下為swap函式片段程式碼, 完整 組合語言程式碼. Line 21-25: 第二次XOR (eax=8 XOR ecx=3),. Return *var * var;.

2

Adrian's Blog: 八月 2010

http://adrianhuang.blogspot.com/2010_08_01_archive.html

What a fascinating Linux it is! 打造簡易作業系統 - 以GNU Assembler組合語言撰寫] (三) Boot Loader 作業系統載入實例 (CF Card). 說明如何撰寫小型Boot Loader將作業系統載入至記憶體並執行該作業系統程式碼,並利用qemu實現。為了更真實性,本篇將boot loader及作業系統安裝在CF card並利用CF card開機,用以證明該boot loader及作業系統可以正確地在實體機器上運行。 是使用軟碟機開機,因此在使用BIOS中斷服務0x13時 (AH=02 Read Sectors from Driver),需將DL暫存器設定為0(0代表軟碟機0,1代表軟碟機1),但因為現在要從硬碟讀取,所以需將DL設定為0x80,即底下範例程式紅色部份。 This code is intended to simulate a simplified boot loader. This boot. Loader loads 3 sectors into the physical memory and jumps the entry.

3

Adrian's Blog: 十二月 2010

http://adrianhuang.blogspot.com/2010_12_01_archive.html

What a fascinating Linux it is! 解決"sudo: must be setuid root"的問題. 今天在自己的Linux桌機 (Ubuntu 10.10) 幹了一件傻事:. Sudo chown -R adrian.adrian /usr/. Sudo: must be setuid root. 這下可high了, Ubuntu在安裝的時候並沒有讓管理者設定root密碼, 所以無法使用root登入, 沒有root權限什麼事都不能做啊! 重新啟動Ubuntu,在grub選單中選擇有recovery mode的選項, Ex: "Ubuntu, with Linux 2.6.35-23-server (recovery mode)". 以recovery模式開機後, 會出現"Recovery Menu"選單, 選擇"root Drop to root shell prompt"選項就可進入root shell prompt。 利用ls -l觀看sudo資訊,所以是擁有此程式使用者的問題。 Sudo chown root.root /usr/. Figure 3為作業系統程式碼...

4

Adrian's Blog: 三月 2015

http://adrianhuang.blogspot.com/2015_03_01_archive.html

What a fascinating Linux it is! Linux Kernel] ACCESS ONCE Macro. 最近看Kernel code,看到這個ACCESS ONCE巨集,仔細看了它的定義發現挺有趣的,順便記錄一下。 ACCESS ONCE顧名思義,就是確實地讀取所指定記憶體位址的內容值,且僅限這一次。所以在這個巨集肯定有volatile關鍵字,其原始定義如下:. Define ACCESS ONCE(x) (*(volatile typeof(x) *)&(x). 底下程式碼擷取於kernel/locking/mutex.c (linux-v4.0-rc1). While (true) { struct task struct *owner; . /* * If there's an owner, wait for it to either * release the lock or go to sleep. */ owner = ACCESS ONCE(lock- owner); if (owner &! 上述程式碼 (存取struct) 可能被編譯器優化 (因為gcc 4&...

5

Adrian's Blog: 三月 2012

http://adrianhuang.blogspot.com/2012_03_01_archive.html

What a fascinating Linux it is! Redirecting standard output and standard error. Ifconfig eth100 msg.log 2 &1. Can be shortened like that:. Ifconfig eth100 & msg.log. Ifconfig eth100 and msg.log. 訂閱: 文章 (Atom). Redirecting standard output and standard error.

UPGRADE TO PREMIUM TO VIEW 14 MORE

TOTAL PAGES IN THIS WEBSITE

19

LINKS TO THIS WEBSITE

mike820324.blogspot.com mike820324.blogspot.com

MicroMike: February 2011

http://mike820324.blogspot.com/2011_02_01_archive.html

This blog is all about computer science, especially the information security. Leave a comment to let me know how to let this blogger get better. Smart phone , PC whats the difference. Feb 10, 2011. Smart phone , PC what's the difference. Today I read an article. Motorola's Atrix 4G: A Phone Thinks It's a Laptop. Wwwtime.com/time/business/article/0,8599,2048149,00.html#ixzz1DZXkSpkA. Subscribe to: Posts (Atom). Reading, Writing and Arithmetic. Picture Window template. Powered by Blogger.

mike820324.blogspot.com mike820324.blogspot.com

MicroMike: August 2011

http://mike820324.blogspot.com/2011_08_01_archive.html

This blog is all about computer science, especially the information security. Leave a comment to let me know how to let this blogger get better. Simple OS - note. Compile qemu under ubuntu. Aug 13, 2011. Simple OS - note. While I was working on my simple operating system project. I found something interesting. Almost all the x86 system boot up in 16-bit real mode. And the way to enable the protected mode is quite easy. Suggest, using the following instruction can take us from real mode to protected mode.

mike820324.blogspot.com mike820324.blogspot.com

MicroMike: November 2011

http://mike820324.blogspot.com/2011_11_01_archive.html

This blog is all about computer science, especially the information security. Leave a comment to let me know how to let this blogger get better. Ubuntu 11.10 plus plasma widget. Setting linux as a gateway. Nov 28, 2011. Ubuntu 11.10 plus plasma widget. I recently install the ubuntu 11.10. I spent some time to get used to the unity interface. But the unity shell is lack of widgets and therefore I decided to install the plasma-desktop to my ubuntu. :P. 1 install the package by the following command:. Https...

mike820324.blogspot.com mike820324.blogspot.com

MicroMike: What the hell is "NetCut" doing and how to prevent

http://mike820324.blogspot.com/2011/12/what-hell-is-netcut-doing-and-how-to.html

This blog is all about computer science, especially the information security. Leave a comment to let me know how to let this blogger get better. What the hell is NetCut doing and how to prevent. What can you do when linux is not responding. Ubuntu 11.10 Notes. Dec 27, 2011. What the hell is "NetCut" doing and how to prevent. NetCut is a program that will help you disconnect other computers in the same subnet of an ethernet network. You can download the program from this link: NetCut. The best way to prev...

mike820324.blogspot.com mike820324.blogspot.com

MicroMike: October 2011

http://mike820324.blogspot.com/2011_10_01_archive.html

This blog is all about computer science, especially the information security. Leave a comment to let me know how to let this blogger get better. Shell code 6(reduced the shellcode size). Dennis Ritchie R.I.P. Oct 31, 2011. Shell code 6(reduced the shellcode size). The size of shellcode is very important. Therefore I list some of the tricks that can reduce the shellcode size and moreover rewirte our shellcode to reduce the size. The following is a quick example for the exit system call. Int $0x80 = 2 bytes.

mike820324.blogspot.com mike820324.blogspot.com

MicroMike: Ubuntu 12.04 notes.

http://mike820324.blogspot.com/2012/10/ubuntu-1204-notes.html

This blog is all about computer science, especially the information security. Leave a comment to let me know how to let this blogger get better. Ubuntu 12.04 notes. Oct 3, 2012. Ubuntu 12.04 notes. My notebook's graphic card is ati radeon hd 4300. If you want to check what graphic card your computer is using just type:. Lspci -vnn grep VGA. And it will show you the information that you need. Actually, there are many ways to install the graphic drivers. The following is just how I set my video drivers.

mike820324.blogspot.com mike820324.blogspot.com

MicroMike: Compile Android 2.3.3 in Slackware 14

http://mike820324.blogspot.com/2013/01/compile-android-233-in-slackware-14.html

This blog is all about computer science, especially the information security. Leave a comment to let me know how to let this blogger get better. Compile Android 2.3.3 in Slackware 14. Linux Kernel 1: How to Compile Linux Kernel. Jan 21, 2013. Compile Android 2.3.3 in Slackware 14. Because the above reason, I decide to compile the android 2.3.3 without downgrade any tools and also to write the whole process down to remind myself how I do it. Linux Distro : Slackware 14 x86 64( with multilib support ).

mike820324.blogspot.com mike820324.blogspot.com

MicroMike: July 2011

http://mike820324.blogspot.com/2011_07_01_archive.html

This blog is all about computer science, especially the information security. Leave a comment to let me know how to let this blogger get better. Shell code 5(execve system call). Shell code 4(another trick). Jul 4, 2011. Shell code 5(execve system call). This article is mainly reference by this website:. Smash the stack for fun and profit. This time I'll use execve system call to remove a file called "test". Before started, let's see how execve works in c. The man page of execve. Compile and execute it.

mike820324.blogspot.com mike820324.blogspot.com

MicroMike: Shell code

http://mike820324.blogspot.com/2011/05/shell-code.html

This blog is all about computer science, especially the information security. Leave a comment to let me know how to let this blogger get better. May 2, 2011. After studying computer science for about two years, I have change my thought about executable files. A executable format may contains many section, such as .text(where your code is stored), .data(where your global variables and static variables is stored). Have you ever wonder if we stored the executable bytes in the .data section? 80482c1: 89 e5 m...

mike820324.blogspot.com mike820324.blogspot.com

MicroMike: June 2011

http://mike820324.blogspot.com/2011_06_01_archive.html

This blog is all about computer science, especially the information security. Leave a comment to let me know how to let this blogger get better. Simple OS - bootloader part1. Shell code 3(print message). Shell code 2 (cont.). Jun 30, 2011. Simple OS - bootloader part1. The past few days, I've finished writing the bootloader. I summarize some of them and will post them on the blog. Before we started writing our code, there are some background knowlege. What is a bootloader? How does it works? Bios interru...

UPGRADE TO PREMIUM TO VIEW 14 MORE

TOTAL LINKS TO THIS WEBSITE

24

OTHER SITES

adrianhproductions.com adrianhproductions.com

Adrian H Productions

Http:/ www.adrianhproductions.com/components/com gk3 photoslide/thumbs big/916100Web P7015768.jpg link. Http:/ www.adrianhproductions.com/components/com gk3 photoslide/thumbs big/305025WebP7216254.jpg link. Http:/ www.adrianhproductions.com/components/com gk3 photoslide/thumbs big/848547Web P4133598.jpg link. Http:/ www.adrianhproductions.com/components/com gk3 photoslide/thumbs big/162689Web P4122606.jpg link. Photos by: Adrian Hernandez Mayweather-Canelo Press Conference See details. Photos by: Adrian ...

adrianhr.com adrianhr.com

Account Suspended

This Account Has Been Suspended.

adrianhrocha.wordpress.com adrianhrocha.wordpress.com

Adrianhrocha's Blog | Just another WordPress.com weblog

Just another WordPress.com weblog. Febrero 1, 2012. Novedoso y nuevo trabajo realizado especialmente para el 26 de Diciembre del 2011. Videoclip villancico, producido para “TIRN AILL”, un grupo vocal único. Experimentar cine “Un Verdadero Taller de Cine”. Abril 9, 2011. Experimentar deja de ser un taller, para ser un proyecto experimental y de aprendizaje único. Avance de Mundo Limpio. Diciembre 9, 2010. Octubre 24, 2010. Agosto 10, 2010. Es una película producida integralmente de manera independiente y ...

adrianhsmith.com adrianhsmith.com

Home - Adrian Smith Halifax NS - Career Portfolio

A Few Things To Know About Me. My name is Adrian Smith from Halifax Nova Scotia and this is my Career Portfolio. I am a young professional whose graduated from the Business Management program at Nova Scotia Community College. In 2012. Currently, I’m pursuing another diploma in Information technology again at NSCC. I’m eager to leverage my strong academic background in Business Management as well as Information Technology to help guide me down my career path. Take a look at some of my past work. Pat, the ...

adrianhuang-eng-notes.blogspot.com adrianhuang-eng-notes.blogspot.com

Adrian's blog for my english notes

Adrian's blog for my english notes. Oct 5, 2010. 1 baton: 指揮棒,接力棒,警棍. 2 climactic: 最高潮的, 頂點的, 極點的. 3 rugby: 英格蘭中部的都市;橄欖球. 標籤: Oct 5 2010. Sept 20, 2010. 2 psychologist, psychiatrist,. Sept 11, 2010. Sept 10, 2010. 1 vent: 排氣口,出口,通風孔,發洩. 2 curative: 治病的,有治病效力的. Sept 09, 2010. 1 magma: 岩漿,糊劑,糊. 2 with most no more than - Ex: with most no more than four meters tall. 3 deceive: 欺騙,哄騙,行騙. 4 or so: 約莫,大約…左右. 5 cone: 圓錐體,球果, 火山錐. 6 spew: 嘔吐,噴湧, 大量噴湧而出. Sept 8, 2010. 1 textile: 紡織品,織物. 2 liven: 使高興,使快活.

adrianhuang.blogspot.com adrianhuang.blogspot.com

Adrian's Blog

What a fascinating Linux it is! Linux Kernel] ACCESS ONCE Macro. 最近看Kernel code,看到這個ACCESS ONCE巨集,仔細看了它的定義發現挺有趣的,順便記錄一下。 ACCESS ONCE顧名思義,就是確實地讀取所指定記憶體位址的內容值,且僅限這一次。所以在這個巨集肯定有volatile關鍵字,其原始定義如下:. Define ACCESS ONCE(x) (*(volatile typeof(x) *)&(x). 底下程式碼擷取於kernel/locking/mutex.c (linux-v4.0-rc1). While (true) { struct task struct *owner; . /* * If there's an owner, wait for it to either * release the lock or go to sleep. */ owner = ACCESS ONCE(lock- owner); if (owner &! 上述程式碼 (存取struct) 可能被編譯器優化 (因為gcc 4&...

adrianhuang.com adrianhuang.com

Welcome to nginx!

If you see this page, the nginx web server is successfully installed and working. Further configuration is required. For online documentation and support please refer to nginx.org. Commercial support is available at nginx.com. Thank you for using nginx.

adrianhubbard.com adrianhubbard.com

Adrian Hubbard No. 42 - Alabama Crimson Tide LB »

Adrian Hubbard No. 42 - Alabama Crimson Tide LB. One of the Top Linebackers in College Football. Alabama and Auburn - Game of the week. Nation's Top 2 Teams - Oregon And Auburn - Both Come From Behind To Win And Stay Unbeaten. NFL Betting: Early Week 13 Pick. Some say the league didn't come down hard enough on Denver head Coach, Josh McDaniels for his part in the Spygate II scandal but after watching the St. Louis Rams pummel the last place Broncos Sunday on their own turf, is there any more discipli...

adrianhudson.com adrianhudson.com

Domain Registration | Website Hosting | IT Support

This domain has been registered for a customer of MGF.net. Provide the following services. SME IT Support and Installation.