text:
9 minus zero
8 plus three
9 minus two
Category: Sectional Directors
Alan Boswell, MCP, CBO
"Nobody gets where they're going without getting out of their comfort zone from time to time" said Boswell, Chief Building Official for Tuscaloosa, Ala. "I never planned on getting so involved. But my former boss, Chief Building Official Dwight T. Junkin, pushed me to participate…. He pushed me to get all the ICC certifications I could."
Alan Boswell isn't sure where he would be if he didn't have mentors coaxing him out of his comfort zone the few times his own resolve didn't.
"Nobody gets where they're going without getting out of their comfort zone from time to time," said Boswell, Chief Building Official for Tuscaloosa, Ala. "I never planned on getting so involved. But my former boss, Chief Building Official Dwight T. Junkin, pushed me to participate in the Code Officials Association of Alabama and other organizations. He pushed me to get all the ICC certifications I could. Turns out he was preparing me to step up and fill his position when he retired. He wanted to make sure I was ready and well qualified.
"There have been many other mentors after I became Chief Building Official for the City of Tuscaloosa," Boswell recalled. "Such as, Jimmy Brothers, a great friend and past president of ICC. He pushed me to get more involved with ICC and help make difference. Looking back, it's sometimes hard for me to believe that I'm where I'm at today.
"We all have a lot of thanks to give to our mentors and most of all it is important that we all become mentors in some way or fashion to help others along the way. I was taught growing up, the only time you look down to a person is when you were extending a hand to help someone up or to help them find their way."
That dream and drive led Boswell to achieve Master Code Professional status, as well as to a lifetime of service in many organizations and on to election as a Director-at-Large on the ICC Board at the 2014 Annual Conference in Ft. Lauderdale.
Now, Boswell wants to make sure his colleagues have the same opportunities he did, even if they need a little urging sometimes.
"My fellow staffers have a timeline for certain goals," he said. "And they have to meet those goals to make sure they stay competitive in their jobs. I don't ask them to do anything I didn't do. I tell them, 'If I could do it, so can you'.
"They may not think much of me while they're taking the certification test. But I see the pride after they get the certifications. The glow in their eyes."
While he was still in school, Boswell had enough self-drive to start his own business, M.A.D. Electrical Contractors, which his brother still runs today. The company performs residential, commercial and some light industrial work, he said, an interest he developed in vocational school. "I had good grades, but I still went to vocational school," he said. "You don't have a lot of vocational schools anymore, and that's a shame. I think we need more high school vocational programs more than ever now."
Boswell used his easygoing style and gentlemanly Southern drawl to excel for 20 years as an electrical construction salesman and instructor. At one point, though, his friends suggested Boswell find something a little less physically draining.
"When you own your own business, it's not an eight-hour day," he said. "It's more like 12 to 14, and you're always chasing the dollar, getting people to pay their bills, paperwork, and climbing ladders and under buildings."
He applied and got a job as Assistant Building Official in Tuscaloosa. But he kept pushing out of that comfort zone, including serving on the Alabama Energy and Residential Code Board. He also was appointed by Alabama Lt. Gov. Kay Ivey in 2012 to serve on the Alabama Heating Air Conditioning and Refrigeration Board. In 2012, he was selected to serve ICC on the Building Officials Membership Council Board. He serves on the Council to help improve the standing of code professionals in the community.
He earned the 2011 ICC "Code Official of the Year" award, which the Alabama House and Senate recognized him for.
When not working, Boswell enjoys hunting, fishing, golf, college football, Little League baseball, gardening and traveling.
Now that he's on the ICC Board, Boswell said he wants to put into practice a longtime philosophy: simplify. He and some others from his region say there needs to be a renewed focus on the original mission of life safety and codes, perhaps even eliminating some and refining others. Although he is passionate about his beliefs, Boswell knows the benefit of sitting on a thought for a while until it's ready for reasonable debate. "I make my best decisions when I've had time to think a bit," he said.
Boswell said running for the board and winning was the next logical step for him after serving as an officer for ICC's Region IX. But leaving his post in Region IX also created an opportunity on that board to let someone new, with new ideas, step up as well. He remembers how important that is after all these years.
"If someone didn't give me the chances I've had," he said, "I wouldn't be the person I am. That's how you grow people."
Kris Bridges
Before pursuing a career in the building code industry, Kris Bridges served in the U.S. Navy for 10 years. During this time, Bridges was involved in safety projects that helped develop his interest in furthering his code education. He attended Baker College and graduated magna cum laude with an associate degree in code administration.
"If you want something you don't have, you have to do something you haven't done," Bridges said.
In 1995, he began his career as a Property Maintenance and Amusement Inspector for Danville, Va., gaining valuable experience in inspecting and ensuring compliance and maintenance of property and amusement devices.
After six years, Kris secured a position as a Combination Code Inspector in Martinsville, Va. In this position, he investigated and advised multiple stakeholders on building safety issues. As one of his many achievements, Bridges created and implemented work practices to help mitigate the economic downturn for the highest unemployment rate in Va. by enabling participation at state, regional and national levels.
Currently, Bridges is the Building Official for the city of Martinsville, Va. He is a Master Code Professional (MCP) who maximizes the safety and integrity of buildings by uncovering and recommending effective remediation strategies for overt and latent issues.
Bridges holds 22 certifications including Certified Building Official, Combination Inspector, Commercial Combination Inspector, Commercial Building Plans Examiner, Commercial Energy Inspector, Commercial Energy Plans Examiner and Commercial Building Inspector. In addition, he was appointed to the Virginia Manufactured Housing Board by the governor, is the Past President of the Virginia Building and Code Officials Association (VBCOA) and is currently serving his second five-year term as ICC Region VII Treasurer.
He has received multiple awards including the 2010 VBCOA President's Award; 2010 Martinsville Fire and Emergency Medical Service (EMS) Unit Citation for Exemplary Customer Service; 2011 Fire Safety Commendation, National Society, Sons of the American Revolution; 2014/2015 ICC Region VII Chairman's Award; and 2015 VBCOA Meritorious Service Award.
As a new member of the ICC Board of Directors, Bridges looks forward to supporting the members and bringing brand recognition to ICC. He believes that the Code Council plays a significant role in building safety and hopes to promote the association's reputation and the important job of the code official.
Bridges demonstrates his commitment to building safety through his participation as chair for several Code Council committees including the International Residential Code Committee and the International Swimming Pool and Spa Drafting Committee. Bridges previously served on the ICC Evaluation Service Board of Managers.
In his spare time, Bridges is active in Boy Scout Troop 326 and has served on the Disabilities Services Board and Mental Health Association Board. Grilling and cooking for family and friends is one of his many hobbies.
Jim H. Brown, CBO, CFPS
Jim Brown, Deputy Building Official for the City of Gillette, Wyoming, said he is "proud and humbled" by his election as a Director at Large. He believes a lot of it has to do with the fact that he was instrumental in pulling together Region II for the ICC, which includes Alaska, Washington, Oregon, Montana, Wyoming and Idaho.
Jim Brown didn't start out wanting to be a Building Official. That desire built slowly and steadily, as if he were tracking a 10-point buck in the woods. After gaining the discipline and focus necessary, he was able to capture certifications, experience and, ultimately, the respect of his peers who elected him to the ICC Board in Portland, the first ICC Board Member to serve from the state of Wyoming, including the legacy code organizations according to Wyoming Chapter historian Bruce Wilson.
Brown, Deputy Building Official for the City of Gillette, Wyoming, said he is "proud and humbled" by his election as a Director at Large. He believes a lot of it has to do with the fact that he was instrumental in pulling together Region II for the ICC, which includes Alaska, Washington, Oregon, Montana, Wyoming and Idaho.
"People had been trying to do it for years," Brown said of organizing Region II. "But this time, it was the right time. And we had the right people." Those people included his mentor John Darnall—a Gillette Wyoming native, former ICC Board Member and Tumwater, Washington, Building and Fire Official—and Bruce Wilson, Chief Building Official in Cheyenne, Wyoming. "And the Board recognized Region II at the Annual Conference in Portland."
That trail began in Carroll County, Maryland, where Brown was born, attended high school and worked until he entered the Air Force in 1976. He was trained as a Life Support Specialist/Forward Air Controller/Survival Instructor, responsible for the inspection and maintenance of air crew life support equipment such as flight gear, parachutes, survival kits and ejection seats. He also trained recruits as a survival instructor.
But after four years and attaining the rank of sergeant, Brown said he passed on a military career like his Dad, who served 35 years in with the Army. Instead, he decided to go back to general contracting around Carroll County, something he had done just before he entered the Air Force. He helped build homes in the county, included in the Baltimore-Washington Metropolitan Area, where the rural atmosphere attracted high-profile clients.
"We built for several players on the Baltimore Orioles," he said. "One of them was (Hall of Famer) Eddie Murray. They were 5,000 to 10,000 square feet. I also worked on some McDonald's and Wendy's. That's where I got some experience in commercial work."
As he was building these McMansions, Brown became intrigued with the code process and code officials, even after becoming a lead carpenter. "I liked the longevity of their business," he said. "Meanwhile, my back, hands and arms were hurting."
So, when Carroll County was looking for a Building Inspector in 1988, Brown applied. And to his shock, he was hired. But county officials knew he needed training. "And that's when my formal education in the codes began," he said. "With CABO's One and Two Family Dwelling Code." Brown was also assisted in his early years by the county's plans examiner Richard (Dick) Owings, who took him under his wing setting the stage for what was to come.
After a promotion to Commercial Plans Examiner in Carroll County, Brown jumped at the chance to become Commercial and Residential Plans Examiner for the City of Gillette, Wyoming, in 2005. He found out about the position opening in Wyoming through the ICC's website career center. After teaming up with Darnall, whom he had met at an Annual Conference in Baltimore, and Wilson, Brown continued his mission of forging alliances among building and fire officials, but this time it was for the membership of the Wyoming Conference of Building Officials (WCBO) and the ICC. He remembered how fired up he got watching the old BOCA hearings. "They opened up a whole new world." He wanted to do the same for others.
Before he knew it, Darnall was nominating Brown for a director's position on the ICC Board while at a WCBO meeting in Cody, Wyoming. Brown is thrilled with the possibilities, including moving full speed ahead on cdp ACCESS. "cdp ACCESS is absolutely critical for engaging more of our Membership," he said.
The move to Wyoming also gave him a chance for another passion: hunting. "I grew up hunting," he said. "Bear, deer … Maryland, Virginia." Now, he'll get out to fill his tags for deer, and maybe get some elk along the way. He and wife Patty also enjoy trail riding. Brown plays acoustic stand-up bass, a very special gift from his mom and dad. It is a 1938 Kay model that has brought him many years of joy playing music.
They also enjoy their grandson, Wyatt who was born in Wyoming, courtesy of daughter Amy and her husband Josh. Wyatt already has been out prairie dog hunting, fishing, four-wheeling, and on horseback Brown said. "And I love it all."
And maybe someday he'll have the chance to tell Wyatt about codes and how they'll continue to help keep him, and the rest of the world, safe. And the ICC can grow with him.
"The ICC is relatively young," Brown. "We will be setting a course that will take us through 2025. We have very, very exciting times ahead."
Ron Hampton, MCP, CBO
After graduating from his vocational high school in 1984, Ron Hampton, a native of Ashland, Kentucky, entered the workforce as a carpenter. Since the beginning of his career, Hampton has been an active and dedicated member of the Carpenters Local Union No. 472. Throughout his membership in the union, he has served on a number of committees and served two terms as Treasurer.
In 1997, after 13 years in the carpentry trade, Hampton decided to extend his career path to building inspection. He was hired as a level one building inspector in the Code Enforcement Division for the City of Ashland. Over the years, Hampton worked his way up the ranks and earned the title of Chief Building Official.
In 2005, Hampton accepted an opportunity to work at the state level as a field Inspector in the Division of Building Code Enforcement, Department of Housing, Buildings and Construction for the Commonwealth of Kentucky. For more than two decades, Hampton has applied his expertise to help advance building safety in Kentucky.
Hampton's strong network of positive mentors has been a great benefit throughout his career. Some of his most notable mentors include: Kentucky Deputy State Fire Marshal C.W. Cornett, retired Fire Inspector Roger Crace, MCP (Master Code Professional), and Building Inspector Field Supervisor Mike Haddix (ret.).
As an established professional, Hampton continuously looks to pay it forward and mentor members of the new generation entering the industry. His advice to new building professionals is "Reach out to your more experienced and mature coworkers and building officials—don't be afraid to get involved."
In addition to his mentorship, Hampton has displayed his leadership and dedication to building safety through participation in a number of Code Council committees. He holds 34 Code Council certifications and four Kentucky Building Inspector Certifications. Hampton was also the recipient of the 2003 Code Council Community Service Award and has been a member of the Code Administrators Association of Kentucky (CAAK) since 1998, serving on its Board of Directors from 2001 to 2016. He is also the Past President of CAAK.
Excited to serve his three-year term with the Board of Directors, Hampton looks forward to continue mentoring and already has eyes set on running for re-election at the end of his current term. His plan for the future also includes considerations for retirement from the state government. This would open up Hampton's schedule for a return to his entrepreneurial endeavors—reinstating his former code consulting company, H.D. Hampton, Inc. Regardless of his status, Hampton plans to remain as involved as possible in the building safety industry. "I love to be involved and when I am, I'm all in!"
Thomas W. Peterson
Maybe it's something Thomas Peterson learned in Boy Scouts, the backbone of youth in his native Utah. Or maybe it was subliminally instilled watching his father devote time to his community.
"When I am a part of something, I give it my all and try to go above and beyond," said Peterson, elected to the ICC Board of Directors at the Annual Business Meeting in Kansas City, Mo.
"So I've always been active in whatever I am a part of, but I really was drawn into ICC while attending my first Annual Business Meeting in Phoenix. I was welcomed by the membership and by the ICC leaders, who made me feel part of the group. That's very important to a young person just getting involved."
As an ICC Board Member, Peterson – Utah's Building Official in the Division of Facilities Construction and Management – said he had, and has, many mentors. He believes it is crucial to pay it forward, not only for the individual's growth, but for that of an industry seeing many of its officials and inspectors retiring soon.
With a state leadership position at the relatively young age of 38, Peterson is well poised to draw in and mentor the next generation of code officials. He certainly can tell them It doesn't matter how you start; just get started.
He got started in the business "as a fluke." After graduating from Box Elder High School, he spent two years in Cape Town, South Africa, where he served on a religious mission for the LDS Church.
Not sure what he wanted to do when he returned home, Peterson accompanied a friend to a job interview for an entry-level electrician.
Very entry-level.
"I started out as an 'expediter,' running parts to different job sites," Peterson said. "I got to know the names of those parts and how they were used."
Ultimately, he became a Journeyman Electrician, installing electrical equipment in commercial and industrial sites, includes hospitals and businesses ranging from a Walmart to a ski resort. Peterson then became a Master Electrician with another firm, installing electrical equipment in commercial and industrial sites.
While he was learning a lot as an electrician, Peterson said he knew he couldn't do the heavy lifting for much longer. He already had two back surgeries, so when an inspector from Brigham City Corp. came by the site one day, he wasn't shy:
"I asked him how a person goes about getting a cushy job like he had," Peterson remembered chuckling. "He told me they just happened to have an opening for an inspector, and I should apply."
So in 2005, he set on an eight-year path as Combination Inspector for Brigham City Corp. There, he provided plan reviews and conducted on-site inspections of commercial, residential and industrial buildings to verify building code compliance. He had the chance to work with the public, helping them with their building code questions and concerns.
"I've always been interested in the code world," said Peterson, who was quick to join the local ICC Chapter in his area. In February of this year, he was installed as President of the ICC's Utah Chapter.
But who knows how long it might have taken for Peterson to get more involved had then-ICC Board President Ron Piester and future President Stephen Jones not welcomed him with open arms at the 2011 AMB in Phoenix?
"For those guys to take the time to welcome me and continue to support me has been just tremendous," said Peterson. Now on the City Council in Brigham City, he encourages his Building Official to attend ICC meetings, as well.
Before taking the job as Utah's Assistant Building Office late in 2015, Peterson served as Chief Building Official for Box Elder County, where he managed the inspection department, and performed inspections and plan reviews.
There, he got the chance to have a statewide impact, working with elected officials in creating ordinances and adopting codes. One of his favorite accomplishments so far has been bringing code officials and legislators together for common ground on the codes.
Peterson, who also has his own electrical contracting business, is married to Jodi, and they have four children, most of whom have adopted Lacrosse, which he coaches. He also enjoys golf, four-wheeling, snowmobiling, mechanic work "and serving those around me."
In late fall each year, they'll pack up the car and head to a friend's cabin in Idaho, where they'll cut down their Christmas tree.
"We pass a lot of good trees on the way out there," Peterson said, "but it's a nice family trip."
Stuart D. Tom, P.E., CBO, FIAE
I believe that the Section A Director has the opportunity to help local jurisdictions benefit not only through the development of effective model codes, but also through regional collaboration with building officials, fire officials, architects, engineers and designers.
If you're trying to catch Stuart Tom at work, you had better do it before lunch … or after. You won't have much luck during lunchtime unless you are a runner.
"I make it a point to run a 10K every day at lunchtime," said Tom, Superintendent of Building and Fire for the City of Burbank, Calif., and Section A Director on the International Code Council Board. "It gets my blood flowing and keeps my head clear the rest of the afternoon."
I believe that the Section A Director has the opportunity to help local jurisdictions benefit not only through the development of effective model codes, but also through regional collaboration with building officials, fire officials, architects, engineers and designers. Section A includes the states of Alaska, California, Hawaii, Nevada, Oregon, and Washington; and the Canadian province of British Columbia.
As a Board Director, Tom continues his commitment to service and leadership. He is a registered engineer in the states of Washington and California, holds a host of professional certifications, and is active in the development of fire and life safety codes and standards at the national and state level.
In his native state of California, Tom has been recognized as the 2006 Building Official of the Year by the California Building Officials Association (CALBO), and was selected as Building Official of the Year in 2009 by the California Fire Chiefs Association Fire Prevention Officers. He is the only person to be so honored by both organizations.
As a recognized expert in various fields of structural design and life-safety systems, he has received several other awards, including the CALBO President's Award in 2010. He was inducted as a Fellow into the Institute for the Advancement of Engineering in 2001. He has taught numerous courses throughout California and authored a self-study training program, which assisted in California's transition to the International Building Code. He is a recognized expert in various aspects of the California Building Code.
So it may have surprised some that he became the Fire Marshal in Glendale in 2013, following nearly 30 years as a Building Official, including 15 years as Glendale's Building Official/Superintendent of Buildings. But Tom said the move was a natural progression not only career-wise, but practically in the trade.
"Building Officials make sure the structures they are working on are safe from the plan stage through construction," he said. "Fire Inspectors make sure they are safe to live and work in, through annual inspections. Since I have worked in both now, I can see where the two meet: building as safely and economically as possible for the builders, the occupants and the community. "
Tom said the dual experience helps him handle situations diplomatically. Chances are he worked on many of the buildings he now oversees as Fire Marshal. He expects that duality of knowledge to help him as a Code Council Director as well. In fact, several leaders in fire safety suggested he broaden his involvement to the national level by running for the ICC Board.
"It's great to have their support," he said. "Now, I can work for ICC on a national level. "
Tom grew up in Northern California, the son of a chemical analyst. Initially, he thought about following in his father's path, but an old interest turned him a different way.
"I just always liked to build things," he said. "My parents have a lot of stories about me always building something. Then, as I got older, I learned there are ways to make sure things are built right. I could help make sure buildings in my community were built safely for a long time. "
He said his first 14 years in the business with the city of Los Angeles was an outstanding baptism into the code world. He worked in various capacities from small homes, to commercial and industrial, to high-rise buildings.
He grew even more there as Building Official/Superintendent of Buildings, responsible for the oversight of engineering, inspection and administrative activities for Glendale, the third largest city within Los Angeles County. Now as Fire Marshal, he oversees the regular inspections to make sure those buildings continue to be safe.
To no one's surprise, Tom is a triathlete who enjoys open water swimming, cycling and running. He is married and has two adult children living in New York and Michigan.
As a Board Director, Tom likely will have the opportunity to go for a run while visiting jurisdictions in Section A. If you want to join him, he'd enjoy the company.
"Now and then I'll get a co-worker to run with me at lunch," he said. "It's a great way to unwind and stay fresh."


text:
Q: Pure CSS conditional styling - is there such a thing? Is it possible, without SASS, LESS, Javascript - just pure CSS to do something similiar to:
.B
{
    display: none;
}

.A:empty
{
     display: none;

     .B
     {
         display: block;
     }
}

So that when class 'A' is empty do something else with container 'B'?
Or that when class 'A' is having some state - do something else with container B?
Examples:
Hover A -> Hide B
Hide B -> Show C
C Empty -> Show D

I've tried finding the correct terms for these states but haven't found anything yet - if there is any?
Non dependant:
I don't want the classes to be dependant upon eachother.

...is not a solution.

Show me when condition in A is reached

Since then I can just do whatever I wanted fine. I want class A to be on some part of the page and class B inside some other container somewhere else - non relative to class A.

A:
edit: to add more info

Every time someone tells you something doesn't exist, isn't worth doing or better to just do it like they do. DOUBLE DOWN ON YOUR RESEARCH.
Links:

*

*https://www.w3.org/TR/css3-conditional/

*https://tabatkins.github.io/specs/css-when-else/

*https://www.w3schools.com/cssref/css_selectors.asp

*https://www.w3schools.com/cssref/sel_attribute_value.asp

*https://logichop.com/docs/logic-hop-conditional-css/
Example:

A: No CSS does not support any pre-built conditions similar to what you are describing, sorry

A: No, there is no way. The following condition can be achieved, when the element has both A and B classes on it. Another way is wrapping elements with those classes in another tag, like

, then doing following in .css:
.wrapper.A:hover + .B {...}

A: HTML:

One

Two

Three

Four

CSS:
.container {
  position: relative;
}
.container > div {
  display: block;
  width: 100px;
  height: 100px;
  position: absolute;
  transition: 200ms all;
}
.A {
  left: 10px;
}
.B {
  left: 120px;
}
.C {
  left: 230px;
}
.D {
  left: 340px;
}
.A:hover ~ .B {
  background-color: green;
}
.A:hover ~ .C {
  opacity: 0;
}
.A:hover ~ .D {
  transform: rotate(-45deg);
}
.B:hover ~ .C {
  background-color: green;
}
.B:hover ~ .D {
  opacity: 0;
}

Working demo: Sibling selector

redpajama_set_name: RedPajamaStackExchange


SMALLRIG Camera M6 Screw 1799 is made of brass. It looks beautiful and fixes devices tightly. Mainly to coordinate with SMALLRIG Double-Threaded M6 Rosette Mount 1752 and SMALLRIG Double-Threaded Rosette Mount 1746.
3.Well-chosen materiel with metallic luster.


Unics Kazan rallied back from a 14-point third-quarter deficit to stun Panathinaikos Superfoods Athens 83-81 on Friday at Basket Hall. Keith Langford starred with 27 points and 5 assists to lead the winners, who won their third straight game to improve to 6-9 and move within one victory of the playoff zone. Latavious Williams was a force inside with 19 points and 9 rebounds, including two key baskets in the final three minutes of the game. Quino Colom added 16 for the winners, who made 8 of 16 three-pointers. Nick Calathes paced the Greens with a career-high 23 points plus 6 assists, Ioannis Bourousis posted 13 points and 7 rebounds, Mike James had 13 points and 5 assists and Chris Singleton added 12 points and 8 boards. The loss snapped Panathinaikos's four-game winning streak and dropped their record to 9-6 and a share of fifth place. Unics rallied in the third quarter to get within 2 and the fourth quarter featured seven lead changes, but after Bourousis gave the Greens a 77-78 edge, his team missed their next 7 shots. The visitors managed to create an opportunity in the closing seconds to tie or win, but missed again.
Four different Panathinaikos starters scored in a 2-8 start for the visitors. Singleton took the margin to 9 with a three-pointer. Marko Banic's basket inside drew Unics within 13-19 after 10 minutes. Singleton had 10 individual points after converting a three-point play to start the second quarter. Williams scored 5 straight points over three possessions, including a high-flying alley-oop slam, to bring the hosts to 18-22. Langford completed the comeback with a pair of scores to make it 24-24. However Calathes took control for the Greens and assisted on a K.C. Rivers triple that gave the visitors their first double-digit advantage, 32-42. After an Orlando Johnson three for Unics, James's nifty drive gave Panathinaikos a 35-44 halftime lead. The Greens came out sharp with the first 5 points of the second half and soon a Calathes three matched his personal best with 18 points and put his team up 38-52. Langford kept Unics afloat and Pavel Antipov connected from downtown to trim the deficit to 51-56. The home team continued to rally and Colom's layup ended the third quarter at 63-65. Langford buried his third three early in the fourth quarter to give Unics its first lead, 68-67. There would be a few more lead changes before Williams put the hosts up 75-71. However Panathinaikos remained within striking distance and regained the lead, 77-78, on Bourousis's three. After that, Panathinaikos missed its next 7 missed shots and Williams scored twice, including another alley-oop to make it 83-78. Rivers drained a three and Panathinaikos had a shot to win or tie at the buzzer, but Demetris Nichols missed and Unics raced off with the victory.
"We did a great job and played with great heart. We were down for 25, 27 minutes and couldn't find our chemistry defensively, but after that, my guys showed their heart and started to fight like warriors. They stayed together and didn't give up, that was the most important thing. We never gave up and believed we would have a chance to return to the game and fight until the end. We played much smarter defensively, with better spacing and controlling the game better. We minimized our mistakes offensively playing more half court offense. We got our shooters involved. I told them this win is a Christmas present and we start the new year with a good smile. I congratulate all of them and also thank the crowd for their support."
"First I want to congratulate Unics Kazan. It was a game that we controlled for about 37 minutes. After that we started to lose control. We made a lot of mistakes. And then it was a new game, point by point. And Unics played better in the last minutes and won. I don't know exactly [to explain the mistakes down the stretch], it is difficult. In some situations we lost the ball at the beginning of the fast break. We protested and got a technical foul. We missed some easy shots under the baskets. Sometimes this happens. Sometimes you play better; sometimes you play bad. The team in general played better for the first 37 minutes, but then we played bad and this is why we lost. "
"We went out and played as a team. In the second half we got stops and moved the ball and made shots and came out with the win. We played to win. We didn't think about New Year's, we wanted to win. It's bene hard for us, New Year's is coming up, so we're gonna have fun too! "
"There are a lot of reasons for this win - Latavious Williams, Quino Colom and myself. I picked it up in the third quarter. I wanted to come out and be much more aggressive. We started the quarter with 5-0 in fouls and those were legitimate fouls. I tried to be really aggressive. They threw a lot of defenders at me, but I took it upon myself to really try to attack in the third quarter."
"It was a difficult game. We knew that before the beginning. We played very well for 25 minutes, but we were bad in the last minutes. We lost our concentration and a big chance to take an important victory."


SWWJ-Laser is Offering 33% off Press Brake orders throughout March 2019!
Southwest Waterjet and Laser has just purchased and installed, what we believe is the most accurate and productive press brake on the market today.
Awesome Press Brake Introductory Offer!
We will hold that discounted price on the same parts for three months!


text:
Franchise Sales Pull Back During the Recession
According to an article from online.wsj.com, "Discouraged by economic conditions, some franchisers are cutting back on efforts to sell franchises."
"Annual applications from franchisers who want to do business in Maryland are down significantly so far this year, says Dale Cantone, an assistant attorney general for the state. First-quarter franchise-registration applications in Maryland fell 16% from a year earlier to 367," said the story. "Other states report similar falloffs. For instance, California's filings from Jan. 1 through its April 20 deadline fell nearly 20% from a year earlier to 769. New York's first-quarter registrations dropped 22% to 348 — the lowest number in five years. Attorneys who process state registrations confirm the pattern."

redpajama_set_name: RedPajamaCommonCrawl


The good news is The Ad-Free Brand is now available (you can get it here). The bad news is that there are a few errors that were introduced between the final proofs and printing of the book that won't be fixed until the next printing (if you buy an EPUB or Kindle version of the book, these should already be fixed).
In Chapter 3, I use a dollar sign, an hourglass, and a star to rate the expense, time, and value of each research project. Unfortunately, the hourglasses got lost in a freak font mix up at the compositor's desk. So instead of hourglasses, in each chart in Chapter 3 you'll see 6s. Argh. If you ever thought that doing research was the devil's work, you will now be vindicated. Check it out and you'll see what I mean.
In Figure 6.2, the label underneath the illustrations, THIS not THIS, is exactly backwards. I'd rather have people thinking of their organizations as on gravitational force in a universe of many than as the only gravitational force at the center of the universe. This should be clear from the text and the caption, but the label is incorrect.
As I discover any other errors in the book, I'll report them here. If you see anything that you think needs to be fixed, please email me at chris(at)newkind.com.


Each year, some of our committed donors support IMANA with gifts of stock or mutual fund shares.
If you own appreciated securities (stocks, bonds or mutual funds held by you for more than one year), donating them to IMANA may allow you to reduce or avoid more capital gains taxes and receive a federal income tax charitable deduction for the full fair market value of the contributed stock.
You can also designate IMANA as the beneficiary of your securities; please contact your broker for more information. This type of gift can be especially appealing if you are holding shares that have appreciated significantly in value but yield a low dividend.


1. Don't 'steal' other peoples' old character names.
2. Don't swear *excessively*, just be aware there may be young players on.
3. Don't abuse, harass, anyone.
4. Racism, bigotry, or any kind of intolerance is not tolerated.
you may use 1 or 2 of their bags at MOST!
script walk around killing things for you, and you must be sitting at the keyboard.
If you aren't at the keyboard regularly, bad things may happen to you.
*sighs* This explicitly means no idle fighting for hours on end.
where you are repeatedly engaged in combat.
if found scripting you forfeit all profits and a fine of 5 to 15% of all your bank accounts.
(or hanging around outside, healing) don't jump in without permission.
'loosely' defined as when you do something enough that someone else complains.
a more relaxed atmosphere here.
06:45, Darkday, Roki 14, 175 AD.


Are you ready for the crash of the pins and cheers of excitement as NCAA Women's Bowling Championships rolls into Northeast Ohio this spring? This event returns to Cleveland featuring 80 student-athletes to compete for a National title. RollHouse Wickliffe will be packed with fans ready for some tough competition and exciting matches over the course of this three- day tournament. Help us cheer on the new kingpin on April 11-13, 2019.


text:
Latest School infrastructure News
Harvard immigration clinic sues for records on ICE detention
CAMBRIDGE, Mass. (AP) — A Harvard Law School clinic has sued federal immigration officials for failing to release records about the use of solitary confinement in immigration detention facilities. The Harvard Immigration and Refugee Clinical Program said in a lawsuit filed in...
Portland nurses 'urgently concerned' about health in schools
PORTLAND, Ore. (AP) — As COVID-19 cases surge in Oregon — forcing some of the state's largest school districts to close last week due to staffing shortages — a letter from three dozen nurses at the Portland Public School District circulated over the weekend, in which they question the...
UVM Medical Center reopens inpatient rehab at Fanny Allen
COLCHESTER, Vt. (AP) — The University of Vermont Medical Center has reopened its inpatient rehabilitation facility at its Fanny Allen campus in Colchester after working more than a year to solve an air quality issue, the hospital said. The issue made some staff feel dizzy and...
Teen placed on sex offender registry after school assaults
LEESBURG, Va. (AP) — A northern Virginia teenager found guilty of sexually assaulting two female classmates at separate schools was ordered Wednesday to attend a locked, residential treatment facility until he turns 18. The 15-year-old boy also was ordered to be placed on the sex...
Judge dismisses challenge to religious exemption elimination
A federal judge has dismissed a lawsuit challenging a law passed last year that eliminated Connecticut's long-standing religious exemption from childhood immunization requirements for schools, colleges and day care facilities, saying the state has an interest in protecting the health of...
Editorial Roundup: Georgia
Rome News-Tribune. January 8, 2022. Editorial: Vote for our educational future It's easy to say "I don't have kids" or "I don't want to pay for that" but supporting the proposed education local option sales tax is an investment in our community's...
Bus driver shortage forces Vancouver schools to go remote
VANCOUVER, Wash. (AP) — A shortage of bus drivers caused by a surge of the highly contagious COVID-19 omicron variant has forced Vancouver Public Schools in southwest Washington to switch to a rotating schedule of remote instruction in its middle and high schools, making it the latest Pacific...
Kemp seeks $2,000 bonuses for teachers soon to speed raise
ATLANTA (AP) — Gov. Brian Kemp wants teachers to get the remaining $2,000 of his proposed $5,000 raise as soon as possible, with plans to ask lawmakers to give teachers a one-time $2,000 bonus before the current budget year ends, according to information obtained by The Associated Press. ...
California budget confronts climate change, homeless, crime
SACRAMENTO, Calif. (AP) — California Gov. Gavin Newsom on Monday proposed a $286.4 billion budget that sets off months of budget talks with his fellow Democrats, who control the state Legislature, before the new fiscal year begins July 1. Newsom focused much of his budget proposal...
Ida victims move from tent camps to trailers 4 months later
SCHRIEVER, La. (AP) — More than four months after Hurricane Ida destroyed or did major damage to their houses, some Louisiana residents are just now moving from tent camps to government-supplied mobile homes and RV trailers. Shantell Campbell of Houma and her three school-aged...


text:
Newsletter & Notifications
BRITAIN GROUP
info@traditionalbritain.org
Traditional Britain Dinner 2014 with Philip Claeys
Saturday, 14th June 2014 7:00pm
Get Events By Email
Help Organise Events
The Traditional Britain Group is delighted to announce that its annual black tie Traditional Britain Dinner will be held on the 14th June in a prestigious venue in central London.
Please join us, and our guest of honour Philip Claeys MEP, from 7pm for a drinks reception (cash bar) followed by a three course meal, including tea and coffee, from 7:30pm.
Philip Claeys, MEP, has graciously accepted our invitation to be our guest of honour, and speaker, at the dinner. Philip was born in Ghent in 1965 and has been a Member of the European Parliament for Flanders with the Flemish conservative & nationalist party, Vlaams Belang (formerly the Vlaams Blok until 2004) for the past decade. He sits on the EU Parliament's Committee on Foreign Affairs, and is a substitute for the Committee on Culture and Education and a member of the Delegation for relations with Australia and New Zealand. Since late 2010, he has been a board member of the pan-European euro-sceptic party European Alliance for Freedom.
Since 1995 he has been a member of the Vlaams Blok Party Executive; of its Brussels-Halle-Vilvoorde District Executive and Group secretary in the Flemish parliament (both till 2003). Since 1999 he has been Chief Editor of the Vlaams Blok magazine and from 1995-1999 he was Chairman of the Vlaams Blok youth wing. The party is very active in Flanders and Brussels and advocates the independence of Flanders. It wants strict limits on immigration and rejects multiculturalism: all existing immigrants would be obliged to fully adopt Flemish culture and language. In 2007 the Party won 17 seats in the House of representatives in Belgium's Federal Parliament and 5 in the senate.
Please join us on the 14th June and purchase your tickets below. It should be noted that the Traditional Britain Dinner has always been held as a non-profit event and the ticket price covers our costs.
Alternatively send a cheque of £59 to:
Traditional Britain Group
BCM Box 9045
WC1N 3XX
Guests should arrive at 7pm for a 7:30pm start. Venue details will be sent out nearer the time. Dress is black tie.
Help the Traditional Britain Group by joining us today.
Whether you would like to donate, start a local group, write for us, or organise an event, the Traditional Britain Group would like to help.
Browse our shop to find materials on the British nation, its institutions, peoples, traditions, and history. All purchases go towards supporting the Traditional Britain Group.
© 2020 Traditional Britain Group
| Privacy Policies
Region * North West Scotland North East Northern Ireland Wales East of England South East South West East Midlands Yorkshire and Humberside West Midlands Other London


text:
You Can Now Download MonoNX Nintendo Switch Emulator For Android Here
By Oliver Haslam | February 16th, 2019
Having an emulator that makes it possible to play console games on things like Android phones and tablets is something that isn't new for most people, but the news that a new Nintendo Switch emulator is in the works, is. The MonoNX emulator takes Nintendo Switch games and makes them work on anything running Android, and that's pretty amazing.
Put together by the Ryujinnx Team with help of ctrninja, MonoNX just needs an Android device with an ARM64 CPU and at least 4GB of memory in order to run. That's a decent starting point for anyone wanting to get their Switch gaming on via anything that isn't a Switch, although we can't imagine many Nintendo gamers who haven't already picked up a real Switch for themselves.
Keeping tabs on the development of this emulator is an easy task if you want to – there's a new Discord project that you can follow, although the news isn't great. While, yes, the emulator is in the works, it currently has "absolutely no graphics" and "only console output."
Hello there, I've been working on this for a few days and I thought I'd finally show it off!
Please note that there is ***absolutely no graphics***, only console output! Also, it's very slow (only runs at about 0.3-0.2fps for me) and it only runs old homebrew (e.g. first libtransistor tests and such).
That means that we're probably a long way from this being something that we'll be using on our own Android devices, but the fact that the work is being done should be enough for anyone who had been wondering. Now, if you'll excuse us, we're off to play some Nintendo Switch games on, you know, a Nintendo Switch. The only problem we have is choosing which of the great games to play first!
If interested in this, you can download the APK file from here. Progress and update on this project can be followed over at GBATemp forum thread here.
Jailbreak iOS 12.1.4: Downgrade To iOS 12.1.1 Beta 3 And Jailbreak Using RootlessJB, Here's How
Downgrade iOS 12.1.4 To iOS 12.1.1 Beta 3 For Jailbreak [Guide]
Download iOS 12.1.4 IPSW Links, OTA Update With Critical FaceTime Bug Patch
Jailbreak iOS 12.1.4 / iOS 12.1.3: Downgrade Now As Brandon Azad Has Released His iOS 12.1.2 Exploit
Download iOS 12.2 Beta 2 IPSW Links, OTA Update Released To Developers
You can follow us on Twitter, add us to your circle on Google+ or like our Facebook page to keep yourself updated on all the latest from Microsoft, Google, Apple, and the Web.


text:
#include <linux/module.h>
#include <linux/init.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/fs.h>
#include <linux/poll.h>
#include <linux/sched.h>
#include <linux/file.h>
#include <linux/cdev.h>
#include <linux/anon_inodes.h>
#include <linux/slab.h>

#include <asm/uaccess.h>

#include "uverbs.h"

MODULE_AUTHOR("Roland Dreier");
MODULE_DESCRIPTION("InfiniBand userspace verbs access");
MODULE_LICENSE("Dual BSD/GPL");

enum {
	IB_UVERBS_MAJOR       = 231,
	IB_UVERBS_BASE_MINOR  = 192,
	IB_UVERBS_MAX_DEVICES = 32
};

#define IB_UVERBS_BASE_DEV	MKDEV(IB_UVERBS_MAJOR, IB_UVERBS_BASE_MINOR)

static struct class *uverbs_class;

DEFINE_SPINLOCK(ib_uverbs_idr_lock);
DEFINE_IDR(ib_uverbs_pd_idr);
DEFINE_IDR(ib_uverbs_mr_idr);
DEFINE_IDR(ib_uverbs_mw_idr);
DEFINE_IDR(ib_uverbs_ah_idr);
DEFINE_IDR(ib_uverbs_cq_idr);
DEFINE_IDR(ib_uverbs_qp_idr);
DEFINE_IDR(ib_uverbs_srq_idr);
DEFINE_IDR(ib_uverbs_xrcd_idr);
DEFINE_IDR(ib_uverbs_rule_idr);

static DEFINE_SPINLOCK(map_lock);
static DECLARE_BITMAP(dev_map, IB_UVERBS_MAX_DEVICES);

static ssize_t (*uverbs_cmd_table[])(struct ib_uverbs_file *file,
				     struct ib_device *ib_dev,
				     const char __user *buf, int in_len,
				     int out_len) = {
	[IB_USER_VERBS_CMD_GET_CONTEXT]		= ib_uverbs_get_context,
	[IB_USER_VERBS_CMD_QUERY_DEVICE]	= ib_uverbs_query_device,
	[IB_USER_VERBS_CMD_QUERY_PORT]		= ib_uverbs_query_port,
	[IB_USER_VERBS_CMD_ALLOC_PD]		= ib_uverbs_alloc_pd,
	[IB_USER_VERBS_CMD_DEALLOC_PD]		= ib_uverbs_dealloc_pd,
	[IB_USER_VERBS_CMD_REG_MR]		= ib_uverbs_reg_mr,
	[IB_USER_VERBS_CMD_REREG_MR]		= ib_uverbs_rereg_mr,
	[IB_USER_VERBS_CMD_DEREG_MR]		= ib_uverbs_dereg_mr,
	[IB_USER_VERBS_CMD_ALLOC_MW]		= ib_uverbs_alloc_mw,
	[IB_USER_VERBS_CMD_DEALLOC_MW]		= ib_uverbs_dealloc_mw,
	[IB_USER_VERBS_CMD_CREATE_COMP_CHANNEL] = ib_uverbs_create_comp_channel,
	[IB_USER_VERBS_CMD_CREATE_CQ]		= ib_uverbs_create_cq,
	[IB_USER_VERBS_CMD_RESIZE_CQ]		= ib_uverbs_resize_cq,
	[IB_USER_VERBS_CMD_POLL_CQ]		= ib_uverbs_poll_cq,
	[IB_USER_VERBS_CMD_REQ_NOTIFY_CQ]	= ib_uverbs_req_notify_cq,
	[IB_USER_VERBS_CMD_DESTROY_CQ]		= ib_uverbs_destroy_cq,
	[IB_USER_VERBS_CMD_CREATE_QP]		= ib_uverbs_create_qp,
	[IB_USER_VERBS_CMD_QUERY_QP]		= ib_uverbs_query_qp,
	[IB_USER_VERBS_CMD_MODIFY_QP]		= ib_uverbs_modify_qp,
	[IB_USER_VERBS_CMD_DESTROY_QP]		= ib_uverbs_destroy_qp,
	[IB_USER_VERBS_CMD_POST_SEND]		= ib_uverbs_post_send,
	[IB_USER_VERBS_CMD_POST_RECV]		= ib_uverbs_post_recv,
	[IB_USER_VERBS_CMD_POST_SRQ_RECV]	= ib_uverbs_post_srq_recv,
	[IB_USER_VERBS_CMD_CREATE_AH]		= ib_uverbs_create_ah,
	[IB_USER_VERBS_CMD_DESTROY_AH]		= ib_uverbs_destroy_ah,
	[IB_USER_VERBS_CMD_ATTACH_MCAST]	= ib_uverbs_attach_mcast,
	[IB_USER_VERBS_CMD_DETACH_MCAST]	= ib_uverbs_detach_mcast,
	[IB_USER_VERBS_CMD_CREATE_SRQ]		= ib_uverbs_create_srq,
	[IB_USER_VERBS_CMD_MODIFY_SRQ]		= ib_uverbs_modify_srq,
	[IB_USER_VERBS_CMD_QUERY_SRQ]		= ib_uverbs_query_srq,
	[IB_USER_VERBS_CMD_DESTROY_SRQ]		= ib_uverbs_destroy_srq,
	[IB_USER_VERBS_CMD_OPEN_XRCD]		= ib_uverbs_open_xrcd,
	[IB_USER_VERBS_CMD_CLOSE_XRCD]		= ib_uverbs_close_xrcd,
	[IB_USER_VERBS_CMD_CREATE_XSRQ]		= ib_uverbs_create_xsrq,
	[IB_USER_VERBS_CMD_OPEN_QP]		= ib_uverbs_open_qp,
};

static int (*uverbs_ex_cmd_table[])(struct ib_uverbs_file *file,
				    struct ib_device *ib_dev,
				    struct ib_udata *ucore,
				    struct ib_udata *uhw) = {
	[IB_USER_VERBS_EX_CMD_CREATE_FLOW]	= ib_uverbs_ex_create_flow,
	[IB_USER_VERBS_EX_CMD_DESTROY_FLOW]	= ib_uverbs_ex_destroy_flow,
	[IB_USER_VERBS_EX_CMD_QUERY_DEVICE]	= ib_uverbs_ex_query_device,
	[IB_USER_VERBS_EX_CMD_CREATE_CQ]	= ib_uverbs_ex_create_cq,
	[IB_USER_VERBS_EX_CMD_CREATE_QP]        = ib_uverbs_ex_create_qp,
};

static void ib_uverbs_add_one(struct ib_device *device);
static void ib_uverbs_remove_one(struct ib_device *device, void *client_data);

static void ib_uverbs_release_dev(struct kobject *kobj)
{
	struct ib_uverbs_device *dev =
		container_of(kobj, struct ib_uverbs_device, kobj);

	cleanup_srcu_struct(&dev->disassociate_srcu);
	kfree(dev);
}

static struct kobj_type ib_uverbs_dev_ktype = {
	.release = ib_uverbs_release_dev,
};

static void ib_uverbs_release_event_file(struct kref *ref)
{
	struct ib_uverbs_event_file *file =
		container_of(ref, struct ib_uverbs_event_file, ref);

	kfree(file);
}

void ib_uverbs_release_ucq(struct ib_uverbs_file *file,
			  struct ib_uverbs_event_file *ev_file,
			  struct ib_ucq_object *uobj)
{
	struct ib_uverbs_event *evt, *tmp;

	if (ev_file) {
		spin_lock_irq(&ev_file->lock);
		list_for_each_entry_safe(evt, tmp, &uobj->comp_list, obj_list) {
			list_del(&evt->list);
			kfree(evt);
		}
		spin_unlock_irq(&ev_file->lock);

		kref_put(&ev_file->ref, ib_uverbs_release_event_file);
	}

	spin_lock_irq(&file->async_file->lock);
	list_for_each_entry_safe(evt, tmp, &uobj->async_list, obj_list) {
		list_del(&evt->list);
		kfree(evt);
	}
	spin_unlock_irq(&file->async_file->lock);
}

void ib_uverbs_release_uevent(struct ib_uverbs_file *file,
			      struct ib_uevent_object *uobj)
{
	struct ib_uverbs_event *evt, *tmp;

	spin_lock_irq(&file->async_file->lock);
	list_for_each_entry_safe(evt, tmp, &uobj->event_list, obj_list) {
		list_del(&evt->list);
		kfree(evt);
	}
	spin_unlock_irq(&file->async_file->lock);
}

static void ib_uverbs_detach_umcast(struct ib_qp *qp,
				    struct ib_uqp_object *uobj)
{
	struct ib_uverbs_mcast_entry *mcast, *tmp;

	list_for_each_entry_safe(mcast, tmp, &uobj->mcast_list, list) {
		ib_detach_mcast(qp, &mcast->gid, mcast->lid);
		list_del(&mcast->list);
		kfree(mcast);
	}
}

static int ib_uverbs_cleanup_ucontext(struct ib_uverbs_file *file,
				      struct ib_ucontext *context)
{
	struct ib_uobject *uobj, *tmp;

	context->closing = 1;

	list_for_each_entry_safe(uobj, tmp, &context->ah_list, list) {
		struct ib_ah *ah = uobj->object;

		idr_remove_uobj(&ib_uverbs_ah_idr, uobj);
		ib_destroy_ah(ah);
		kfree(uobj);
	}

	/* Remove MWs before QPs, in order to support type 2A MWs. */
	list_for_each_entry_safe(uobj, tmp, &context->mw_list, list) {
		struct ib_mw *mw = uobj->object;

		idr_remove_uobj(&ib_uverbs_mw_idr, uobj);
		ib_dealloc_mw(mw);
		kfree(uobj);
	}

	list_for_each_entry_safe(uobj, tmp, &context->rule_list, list) {
		struct ib_flow *flow_id = uobj->object;

		idr_remove_uobj(&ib_uverbs_rule_idr, uobj);
		ib_destroy_flow(flow_id);
		kfree(uobj);
	}

	list_for_each_entry_safe(uobj, tmp, &context->qp_list, list) {
		struct ib_qp *qp = uobj->object;
		struct ib_uqp_object *uqp =
			container_of(uobj, struct ib_uqp_object, uevent.uobject);

		idr_remove_uobj(&ib_uverbs_qp_idr, uobj);
		if (qp != qp->real_qp) {
			ib_close_qp(qp);
		} else {
			ib_uverbs_detach_umcast(qp, uqp);
			ib_destroy_qp(qp);
		}
		ib_uverbs_release_uevent(file, &uqp->uevent);
		kfree(uqp);
	}

	list_for_each_entry_safe(uobj, tmp, &context->srq_list, list) {
		struct ib_srq *srq = uobj->object;
		struct ib_uevent_object *uevent =
			container_of(uobj, struct ib_uevent_object, uobject);

		idr_remove_uobj(&ib_uverbs_srq_idr, uobj);
		ib_destroy_srq(srq);
		ib_uverbs_release_uevent(file, uevent);
		kfree(uevent);
	}

	list_for_each_entry_safe(uobj, tmp, &context->cq_list, list) {
		struct ib_cq *cq = uobj->object;
		struct ib_uverbs_event_file *ev_file = cq->cq_context;
		struct ib_ucq_object *ucq =
			container_of(uobj, struct ib_ucq_object, uobject);

		idr_remove_uobj(&ib_uverbs_cq_idr, uobj);
		ib_destroy_cq(cq);
		ib_uverbs_release_ucq(file, ev_file, ucq);
		kfree(ucq);
	}

	list_for_each_entry_safe(uobj, tmp, &context->mr_list, list) {
		struct ib_mr *mr = uobj->object;

		idr_remove_uobj(&ib_uverbs_mr_idr, uobj);
		ib_dereg_mr(mr);
		kfree(uobj);
	}

	mutex_lock(&file->device->xrcd_tree_mutex);
	list_for_each_entry_safe(uobj, tmp, &context->xrcd_list, list) {
		struct ib_xrcd *xrcd = uobj->object;
		struct ib_uxrcd_object *uxrcd =
			container_of(uobj, struct ib_uxrcd_object, uobject);

		idr_remove_uobj(&ib_uverbs_xrcd_idr, uobj);
		ib_uverbs_dealloc_xrcd(file->device, xrcd);
		kfree(uxrcd);
	}
	mutex_unlock(&file->device->xrcd_tree_mutex);

	list_for_each_entry_safe(uobj, tmp, &context->pd_list, list) {
		struct ib_pd *pd = uobj->object;

		idr_remove_uobj(&ib_uverbs_pd_idr, uobj);
		ib_dealloc_pd(pd);
		kfree(uobj);
	}

	put_pid(context->tgid);

	return context->device->dealloc_ucontext(context);
}

static void ib_uverbs_comp_dev(struct ib_uverbs_device *dev)
{
	complete(&dev->comp);
}

static void ib_uverbs_release_file(struct kref *ref)
{
	struct ib_uverbs_file *file =
		container_of(ref, struct ib_uverbs_file, ref);
	struct ib_device *ib_dev;
	int srcu_key;

	srcu_key = srcu_read_lock(&file->device->disassociate_srcu);
	ib_dev = srcu_dereference(file->device->ib_dev,
				  &file->device->disassociate_srcu);
	if (ib_dev && !ib_dev->disassociate_ucontext)
		module_put(ib_dev->owner);
	srcu_read_unlock(&file->device->disassociate_srcu, srcu_key);

	if (atomic_dec_and_test(&file->device->refcount))
		ib_uverbs_comp_dev(file->device);

	kfree(file);
}

static ssize_t ib_uverbs_event_read(struct file *filp, char __user *buf,
				    size_t count, loff_t *pos)
{
	struct ib_uverbs_event_file *file = filp->private_data;
	struct ib_uverbs_event *event;
	int eventsz;
	int ret = 0;

	spin_lock_irq(&file->lock);

	while (list_empty(&file->event_list)) {
		spin_unlock_irq(&file->lock);

		if (filp->f_flags & O_NONBLOCK)
			return -EAGAIN;

		if (wait_event_interruptible(file->poll_wait,
					     (!list_empty(&file->event_list) ||
			/* The barriers built into wait_event_interruptible()
			 * and wake_up() guarentee this will see the null set
			 * without using RCU
			 */
					     !file->uverbs_file->device->ib_dev)))
			return -ERESTARTSYS;

		/* If device was disassociated and no event exists set an error */
		if (list_empty(&file->event_list) &&
		    !file->uverbs_file->device->ib_dev)
			return -EIO;

		spin_lock_irq(&file->lock);
	}

	event = list_entry(file->event_list.next, struct ib_uverbs_event, list);

	if (file->is_async)
		eventsz = sizeof (struct ib_uverbs_async_event_desc);
	else
		eventsz = sizeof (struct ib_uverbs_comp_event_desc);

	if (eventsz > count) {
		ret   = -EINVAL;
		event = NULL;
	} else {
		list_del(file->event_list.next);
		if (event->counter) {
			++(*event->counter);
			list_del(&event->obj_list);
		}
	}

	spin_unlock_irq(&file->lock);

	if (event) {
		if (copy_to_user(buf, event, eventsz))
			ret = -EFAULT;
		else
			ret = eventsz;
	}

	kfree(event);

	return ret;
}

static unsigned int ib_uverbs_event_poll(struct file *filp,
					 struct poll_table_struct *wait)
{
	unsigned int pollflags = 0;
	struct ib_uverbs_event_file *file = filp->private_data;

	poll_wait(filp, &file->poll_wait, wait);

	spin_lock_irq(&file->lock);
	if (!list_empty(&file->event_list))
		pollflags = POLLIN | POLLRDNORM;
	spin_unlock_irq(&file->lock);

	return pollflags;
}

static int ib_uverbs_event_fasync(int fd, struct file *filp, int on)
{
	struct ib_uverbs_event_file *file = filp->private_data;

	return fasync_helper(fd, filp, on, &file->async_queue);
}

static int ib_uverbs_event_close(struct inode *inode, struct file *filp)
{
	struct ib_uverbs_event_file *file = filp->private_data;
	struct ib_uverbs_event *entry, *tmp;
	int closed_already = 0;

	mutex_lock(&file->uverbs_file->device->lists_mutex);
	spin_lock_irq(&file->lock);
	closed_already = file->is_closed;
	file->is_closed = 1;
	list_for_each_entry_safe(entry, tmp, &file->event_list, list) {
		if (entry->counter)
			list_del(&entry->obj_list);
		kfree(entry);
	}
	spin_unlock_irq(&file->lock);
	if (!closed_already) {
		list_del(&file->list);
		if (file->is_async)
			ib_unregister_event_handler(&file->uverbs_file->
				event_handler);
	}
	mutex_unlock(&file->uverbs_file->device->lists_mutex);

	kref_put(&file->uverbs_file->ref, ib_uverbs_release_file);
	kref_put(&file->ref, ib_uverbs_release_event_file);

	return 0;
}

static const struct file_operations uverbs_event_fops = {
	.owner	 = THIS_MODULE,
	.read	 = ib_uverbs_event_read,
	.poll    = ib_uverbs_event_poll,
	.release = ib_uverbs_event_close,
	.fasync  = ib_uverbs_event_fasync,
	.llseek	 = no_llseek,
};

void ib_uverbs_comp_handler(struct ib_cq *cq, void *cq_context)
{
	struct ib_uverbs_event_file    *file = cq_context;
	struct ib_ucq_object	       *uobj;
	struct ib_uverbs_event	       *entry;
	unsigned long			flags;

	if (!file)
		return;

	spin_lock_irqsave(&file->lock, flags);
	if (file->is_closed) {
		spin_unlock_irqrestore(&file->lock, flags);
		return;
	}

	entry = kmalloc(sizeof *entry, GFP_ATOMIC);
	if (!entry) {
		spin_unlock_irqrestore(&file->lock, flags);
		return;
	}

	uobj = container_of(cq->uobject, struct ib_ucq_object, uobject);

	entry->desc.comp.cq_handle = cq->uobject->user_handle;
	entry->counter		   = &uobj->comp_events_reported;

	list_add_tail(&entry->list, &file->event_list);
	list_add_tail(&entry->obj_list, &uobj->comp_list);
	spin_unlock_irqrestore(&file->lock, flags);

	wake_up_interruptible(&file->poll_wait);
	kill_fasync(&file->async_queue, SIGIO, POLL_IN);
}

static void ib_uverbs_async_handler(struct ib_uverbs_file *file,
				    __u64 element, __u64 event,
				    struct list_head *obj_list,
				    u32 *counter)
{
	struct ib_uverbs_event *entry;
	unsigned long flags;

	spin_lock_irqsave(&file->async_file->lock, flags);
	if (file->async_file->is_closed) {
		spin_unlock_irqrestore(&file->async_file->lock, flags);
		return;
	}

	entry = kmalloc(sizeof *entry, GFP_ATOMIC);
	if (!entry) {
		spin_unlock_irqrestore(&file->async_file->lock, flags);
		return;
	}

	entry->desc.async.element    = element;
	entry->desc.async.event_type = event;
	entry->desc.async.reserved   = 0;
	entry->counter               = counter;

	list_add_tail(&entry->list, &file->async_file->event_list);
	if (obj_list)
		list_add_tail(&entry->obj_list, obj_list);
	spin_unlock_irqrestore(&file->async_file->lock, flags);

	wake_up_interruptible(&file->async_file->poll_wait);
	kill_fasync(&file->async_file->async_queue, SIGIO, POLL_IN);
}

void ib_uverbs_cq_event_handler(struct ib_event *event, void *context_ptr)
{
	struct ib_ucq_object *uobj = container_of(event->element.cq->uobject,
						  struct ib_ucq_object, uobject);

	ib_uverbs_async_handler(uobj->uverbs_file, uobj->uobject.user_handle,
				event->event, &uobj->async_list,
				&uobj->async_events_reported);
}

void ib_uverbs_qp_event_handler(struct ib_event *event, void *context_ptr)
{
	struct ib_uevent_object *uobj;

	/* for XRC target qp's, check that qp is live */
	if (!event->element.qp->uobject || !event->element.qp->uobject->live)
		return;

	uobj = container_of(event->element.qp->uobject,
			    struct ib_uevent_object, uobject);

	ib_uverbs_async_handler(context_ptr, uobj->uobject.user_handle,
				event->event, &uobj->event_list,
				&uobj->events_reported);
}

void ib_uverbs_srq_event_handler(struct ib_event *event, void *context_ptr)
{
	struct ib_uevent_object *uobj;

	uobj = container_of(event->element.srq->uobject,
			    struct ib_uevent_object, uobject);

	ib_uverbs_async_handler(context_ptr, uobj->uobject.user_handle,
				event->event, &uobj->event_list,
				&uobj->events_reported);
}

void ib_uverbs_event_handler(struct ib_event_handler *handler,
			     struct ib_event *event)
{
	struct ib_uverbs_file *file =
		container_of(handler, struct ib_uverbs_file, event_handler);

	ib_uverbs_async_handler(file, event->element.port_num, event->event,
				NULL, NULL);
}

void ib_uverbs_free_async_event_file(struct ib_uverbs_file *file)
{
	kref_put(&file->async_file->ref, ib_uverbs_release_event_file);
	file->async_file = NULL;
}

struct file *ib_uverbs_alloc_event_file(struct ib_uverbs_file *uverbs_file,
					struct ib_device	*ib_dev,
					int is_async)
{
	struct ib_uverbs_event_file *ev_file;
	struct file *filp;
	int ret;

	ev_file = kzalloc(sizeof(*ev_file), GFP_KERNEL);
	if (!ev_file)
		return ERR_PTR(-ENOMEM);

	kref_init(&ev_file->ref);
	spin_lock_init(&ev_file->lock);
	INIT_LIST_HEAD(&ev_file->event_list);
	init_waitqueue_head(&ev_file->poll_wait);
	ev_file->uverbs_file = uverbs_file;
	kref_get(&ev_file->uverbs_file->ref);
	ev_file->async_queue = NULL;
	ev_file->is_closed   = 0;

	filp = anon_inode_getfile("[infinibandevent]", &uverbs_event_fops,
				  ev_file, O_RDONLY);
	if (IS_ERR(filp))
		goto err_put_refs;

	mutex_lock(&uverbs_file->device->lists_mutex);
	list_add_tail(&ev_file->list,
		      &uverbs_file->device->uverbs_events_file_list);
	mutex_unlock(&uverbs_file->device->lists_mutex);

	if (is_async) {
		WARN_ON(uverbs_file->async_file);
		uverbs_file->async_file = ev_file;
		kref_get(&uverbs_file->async_file->ref);
		INIT_IB_EVENT_HANDLER(&uverbs_file->event_handler,
				      ib_dev,
				      ib_uverbs_event_handler);
		ret = ib_register_event_handler(&uverbs_file->event_handler);
		if (ret)
			goto err_put_file;

		/* At that point async file stuff was fully set */
		ev_file->is_async = 1;
	}

	return filp;

err_put_file:
	fput(filp);
	kref_put(&uverbs_file->async_file->ref, ib_uverbs_release_event_file);
	uverbs_file->async_file = NULL;
	return ERR_PTR(ret);

err_put_refs:
	kref_put(&ev_file->uverbs_file->ref, ib_uverbs_release_file);
	kref_put(&ev_file->ref, ib_uverbs_release_event_file);
	return filp;
}

/*
 * Look up a completion event file by FD.  If lookup is successful,
 * takes a ref to the event file struct that it returns; if
 * unsuccessful, returns NULL.
 */
struct ib_uverbs_event_file *ib_uverbs_lookup_comp_file(int fd)
{
	struct ib_uverbs_event_file *ev_file = NULL;
	struct fd f = fdget(fd);

	if (!f.file)
		return NULL;

	if (f.file->f_op != &uverbs_event_fops)
		goto out;

	ev_file = f.file->private_data;
	if (ev_file->is_async) {
		ev_file = NULL;
		goto out;
	}

	kref_get(&ev_file->ref);

out:
	fdput(f);
	return ev_file;
}

static ssize_t ib_uverbs_write(struct file *filp, const char __user *buf,
			     size_t count, loff_t *pos)
{
	struct ib_uverbs_file *file = filp->private_data;
	struct ib_device *ib_dev;
	struct ib_uverbs_cmd_hdr hdr;
	__u32 flags;
	int srcu_key;
	ssize_t ret;

	if (count < sizeof hdr)
		return -EINVAL;

	if (copy_from_user(&hdr, buf, sizeof hdr))
		return -EFAULT;

	srcu_key = srcu_read_lock(&file->device->disassociate_srcu);
	ib_dev = srcu_dereference(file->device->ib_dev,
				  &file->device->disassociate_srcu);
	if (!ib_dev) {
		ret = -EIO;
		goto out;
	}

	flags = (hdr.command &
		 IB_USER_VERBS_CMD_FLAGS_MASK) >> IB_USER_VERBS_CMD_FLAGS_SHIFT;

	if (!flags) {
		__u32 command;

		if (hdr.command & ~(__u32)(IB_USER_VERBS_CMD_FLAGS_MASK |
					   IB_USER_VERBS_CMD_COMMAND_MASK)) {
			ret = -EINVAL;
			goto out;
		}

		command = hdr.command & IB_USER_VERBS_CMD_COMMAND_MASK;

		if (command >= ARRAY_SIZE(uverbs_cmd_table) ||
		    !uverbs_cmd_table[command]) {
			ret = -EINVAL;
			goto out;
		}

		if (!file->ucontext &&
		    command != IB_USER_VERBS_CMD_GET_CONTEXT) {
			ret = -EINVAL;
			goto out;
		}

		if (!(ib_dev->uverbs_cmd_mask & (1ull << command))) {
			ret = -ENOSYS;
			goto out;
		}

		if (hdr.in_words * 4 != count) {
			ret = -EINVAL;
			goto out;
		}

		ret = uverbs_cmd_table[command](file, ib_dev,
						 buf + sizeof(hdr),
						 hdr.in_words * 4,
						 hdr.out_words * 4);

	} else if (flags == IB_USER_VERBS_CMD_FLAG_EXTENDED) {
		__u32 command;

		struct ib_uverbs_ex_cmd_hdr ex_hdr;
		struct ib_udata ucore;
		struct ib_udata uhw;
		size_t written_count = count;

		if (hdr.command & ~(__u32)(IB_USER_VERBS_CMD_FLAGS_MASK |
					   IB_USER_VERBS_CMD_COMMAND_MASK)) {
			ret = -EINVAL;
			goto out;
		}

		command = hdr.command & IB_USER_VERBS_CMD_COMMAND_MASK;

		if (command >= ARRAY_SIZE(uverbs_ex_cmd_table) ||
		    !uverbs_ex_cmd_table[command]) {
			ret = -ENOSYS;
			goto out;
		}

		if (!file->ucontext) {
			ret = -EINVAL;
			goto out;
		}

		if (!(ib_dev->uverbs_ex_cmd_mask & (1ull << command))) {
			ret = -ENOSYS;
			goto out;
		}

		if (count < (sizeof(hdr) + sizeof(ex_hdr))) {
			ret = -EINVAL;
			goto out;
		}

		if (copy_from_user(&ex_hdr, buf + sizeof(hdr), sizeof(ex_hdr))) {
			ret = -EFAULT;
			goto out;
		}

		count -= sizeof(hdr) + sizeof(ex_hdr);
		buf += sizeof(hdr) + sizeof(ex_hdr);

		if ((hdr.in_words + ex_hdr.provider_in_words) * 8 != count) {
			ret = -EINVAL;
			goto out;
		}

		if (ex_hdr.cmd_hdr_reserved) {
			ret = -EINVAL;
			goto out;
		}

		if (ex_hdr.response) {
			if (!hdr.out_words && !ex_hdr.provider_out_words) {
				ret = -EINVAL;
				goto out;
			}

			if (!access_ok(VERIFY_WRITE,
				       (void __user *) (unsigned long) ex_hdr.response,
				       (hdr.out_words + ex_hdr.provider_out_words) * 8)) {
				ret = -EFAULT;
				goto out;
			}
		} else {
			if (hdr.out_words || ex_hdr.provider_out_words) {
				ret = -EINVAL;
				goto out;
			}
		}

		INIT_UDATA_BUF_OR_NULL(&ucore, buf, (unsigned long) ex_hdr.response,
				       hdr.in_words * 8, hdr.out_words * 8);

		INIT_UDATA_BUF_OR_NULL(&uhw,
				       buf + ucore.inlen,
				       (unsigned long) ex_hdr.response + ucore.outlen,
				       ex_hdr.provider_in_words * 8,
				       ex_hdr.provider_out_words * 8);

		ret = uverbs_ex_cmd_table[command](file,
						   ib_dev,
						   &ucore,
						   &uhw);
		if (!ret)
			ret = written_count;
	} else {
		ret = -ENOSYS;
	}

out:
	srcu_read_unlock(&file->device->disassociate_srcu, srcu_key);
	return ret;
}

static int ib_uverbs_mmap(struct file *filp, struct vm_area_struct *vma)
{
	struct ib_uverbs_file *file = filp->private_data;
	struct ib_device *ib_dev;
	int ret = 0;
	int srcu_key;

	srcu_key = srcu_read_lock(&file->device->disassociate_srcu);
	ib_dev = srcu_dereference(file->device->ib_dev,
				  &file->device->disassociate_srcu);
	if (!ib_dev) {
		ret = -EIO;
		goto out;
	}

	if (!file->ucontext)
		ret = -ENODEV;
	else
		ret = ib_dev->mmap(file->ucontext, vma);
out:
	srcu_read_unlock(&file->device->disassociate_srcu, srcu_key);
	return ret;
}

/*
 * ib_uverbs_open() does not need the BKL:
 *
 *  - the ib_uverbs_device structures are properly reference counted and
 *    everything else is purely local to the file being created, so
 *    races against other open calls are not a problem;
 *  - there is no ioctl method to race against;
 *  - the open method will either immediately run -ENXIO, or all
 *    required initialization will be done.
 */
static int ib_uverbs_open(struct inode *inode, struct file *filp)
{
	struct ib_uverbs_device *dev;
	struct ib_uverbs_file *file;
	struct ib_device *ib_dev;
	int ret;
	int module_dependent;
	int srcu_key;

	dev = container_of(inode->i_cdev, struct ib_uverbs_device, cdev);
	if (!atomic_inc_not_zero(&dev->refcount))
		return -ENXIO;

	srcu_key = srcu_read_lock(&dev->disassociate_srcu);
	mutex_lock(&dev->lists_mutex);
	ib_dev = srcu_dereference(dev->ib_dev,
				  &dev->disassociate_srcu);
	if (!ib_dev) {
		ret = -EIO;
		goto err;
	}

	/* In case IB device supports disassociate ucontext, there is no hard
	 * dependency between uverbs device and its low level device.
	 */
	module_dependent = !(ib_dev->disassociate_ucontext);

	if (module_dependent) {
		if (!try_module_get(ib_dev->owner)) {
			ret = -ENODEV;
			goto err;
		}
	}

	file = kzalloc(sizeof(*file), GFP_KERNEL);
	if (!file) {
		ret = -ENOMEM;
		if (module_dependent)
			goto err_module;

		goto err;
	}

	file->device	 = dev;
	file->ucontext	 = NULL;
	file->async_file = NULL;
	kref_init(&file->ref);
	mutex_init(&file->mutex);

	filp->private_data = file;
	kobject_get(&dev->kobj);
	list_add_tail(&file->list, &dev->uverbs_file_list);
	mutex_unlock(&dev->lists_mutex);
	srcu_read_unlock(&dev->disassociate_srcu, srcu_key);

	return nonseekable_open(inode, filp);

err_module:
	module_put(ib_dev->owner);

err:
	mutex_unlock(&dev->lists_mutex);
	srcu_read_unlock(&dev->disassociate_srcu, srcu_key);
	if (atomic_dec_and_test(&dev->refcount))
		ib_uverbs_comp_dev(dev);

	return ret;
}

static int ib_uverbs_close(struct inode *inode, struct file *filp)
{
	struct ib_uverbs_file *file = filp->private_data;
	struct ib_uverbs_device *dev = file->device;
	struct ib_ucontext *ucontext = NULL;

	mutex_lock(&file->device->lists_mutex);
	ucontext = file->ucontext;
	file->ucontext = NULL;
	if (!file->is_closed) {
		list_del(&file->list);
		file->is_closed = 1;
	}
	mutex_unlock(&file->device->lists_mutex);
	if (ucontext)
		ib_uverbs_cleanup_ucontext(file, ucontext);

	if (file->async_file)
		kref_put(&file->async_file->ref, ib_uverbs_release_event_file);

	kref_put(&file->ref, ib_uverbs_release_file);
	kobject_put(&dev->kobj);

	return 0;
}

static const struct file_operations uverbs_fops = {
	.owner	 = THIS_MODULE,
	.write	 = ib_uverbs_write,
	.open	 = ib_uverbs_open,
	.release = ib_uverbs_close,
	.llseek	 = no_llseek,
};

static const struct file_operations uverbs_mmap_fops = {
	.owner	 = THIS_MODULE,
	.write	 = ib_uverbs_write,
	.mmap    = ib_uverbs_mmap,
	.open	 = ib_uverbs_open,
	.release = ib_uverbs_close,
	.llseek	 = no_llseek,
};

static struct ib_client uverbs_client = {
	.name   = "uverbs",
	.add    = ib_uverbs_add_one,
	.remove = ib_uverbs_remove_one
};

static ssize_t show_ibdev(struct device *device, struct device_attribute *attr,
			  char *buf)
{
	int ret = -ENODEV;
	int srcu_key;
	struct ib_uverbs_device *dev = dev_get_drvdata(device);
	struct ib_device *ib_dev;

	if (!dev)
		return -ENODEV;

	srcu_key = srcu_read_lock(&dev->disassociate_srcu);
	ib_dev = srcu_dereference(dev->ib_dev, &dev->disassociate_srcu);
	if (ib_dev)
		ret = sprintf(buf, "%s\n", ib_dev->name);
	srcu_read_unlock(&dev->disassociate_srcu, srcu_key);

	return ret;
}
static DEVICE_ATTR(ibdev, S_IRUGO, show_ibdev, NULL);

static ssize_t show_dev_abi_version(struct device *device,
				    struct device_attribute *attr, char *buf)
{
	struct ib_uverbs_device *dev = dev_get_drvdata(device);
	int ret = -ENODEV;
	int srcu_key;
	struct ib_device *ib_dev;

	if (!dev)
		return -ENODEV;
	srcu_key = srcu_read_lock(&dev->disassociate_srcu);
	ib_dev = srcu_dereference(dev->ib_dev, &dev->disassociate_srcu);
	if (ib_dev)
		ret = sprintf(buf, "%d\n", ib_dev->uverbs_abi_ver);
	srcu_read_unlock(&dev->disassociate_srcu, srcu_key);

	return ret;
}
static DEVICE_ATTR(abi_version, S_IRUGO, show_dev_abi_version, NULL);

static CLASS_ATTR_STRING(abi_version, S_IRUGO,
			 __stringify(IB_USER_VERBS_ABI_VERSION));

static dev_t overflow_maj;
static DECLARE_BITMAP(overflow_map, IB_UVERBS_MAX_DEVICES);

/*
 * If we have more than IB_UVERBS_MAX_DEVICES, dynamically overflow by
 * requesting a new major number and doubling the number of max devices we
 * support. It's stupid, but simple.
 */
static int find_overflow_devnum(void)
{
	int ret;

	if (!overflow_maj) {
		ret = alloc_chrdev_region(&overflow_maj, 0, IB_UVERBS_MAX_DEVICES,
					  "infiniband_verbs");
		if (ret) {
			printk(KERN_ERR "user_verbs: couldn't register dynamic device number\n");
			return ret;
		}
	}

	ret = find_first_zero_bit(overflow_map, IB_UVERBS_MAX_DEVICES);
	if (ret >= IB_UVERBS_MAX_DEVICES)
		return -1;

	return ret;
}

static void ib_uverbs_add_one(struct ib_device *device)
{
	int devnum;
	dev_t base;
	struct ib_uverbs_device *uverbs_dev;
	int ret;

	if (!device->alloc_ucontext)
		return;

	uverbs_dev = kzalloc(sizeof *uverbs_dev, GFP_KERNEL);
	if (!uverbs_dev)
		return;

	ret = init_srcu_struct(&uverbs_dev->disassociate_srcu);
	if (ret) {
		kfree(uverbs_dev);
		return;
	}

	atomic_set(&uverbs_dev->refcount, 1);
	init_completion(&uverbs_dev->comp);
	uverbs_dev->xrcd_tree = RB_ROOT;
	mutex_init(&uverbs_dev->xrcd_tree_mutex);
	kobject_init(&uverbs_dev->kobj, &ib_uverbs_dev_ktype);
	mutex_init(&uverbs_dev->lists_mutex);
	INIT_LIST_HEAD(&uverbs_dev->uverbs_file_list);
	INIT_LIST_HEAD(&uverbs_dev->uverbs_events_file_list);

	spin_lock(&map_lock);
	devnum = find_first_zero_bit(dev_map, IB_UVERBS_MAX_DEVICES);
	if (devnum >= IB_UVERBS_MAX_DEVICES) {
		spin_unlock(&map_lock);
		devnum = find_overflow_devnum();
		if (devnum < 0)
			goto err;

		spin_lock(&map_lock);
		uverbs_dev->devnum = devnum + IB_UVERBS_MAX_DEVICES;
		base = devnum + overflow_maj;
		set_bit(devnum, overflow_map);
	} else {
		uverbs_dev->devnum = devnum;
		base = devnum + IB_UVERBS_BASE_DEV;
		set_bit(devnum, dev_map);
	}
	spin_unlock(&map_lock);

	rcu_assign_pointer(uverbs_dev->ib_dev, device);
	uverbs_dev->num_comp_vectors = device->num_comp_vectors;

	cdev_init(&uverbs_dev->cdev, NULL);
	uverbs_dev->cdev.owner = THIS_MODULE;
	uverbs_dev->cdev.ops = device->mmap ? &uverbs_mmap_fops : &uverbs_fops;
	uverbs_dev->cdev.kobj.parent = &uverbs_dev->kobj;
	kobject_set_name(&uverbs_dev->cdev.kobj, "uverbs%d", uverbs_dev->devnum);
	if (cdev_add(&uverbs_dev->cdev, base, 1))
		goto err_cdev;

	uverbs_dev->dev = device_create(uverbs_class, device->dma_device,
					uverbs_dev->cdev.dev, uverbs_dev,
					"uverbs%d", uverbs_dev->devnum);
	if (IS_ERR(uverbs_dev->dev))
		goto err_cdev;

	if (device_create_file(uverbs_dev->dev, &dev_attr_ibdev))
		goto err_class;
	if (device_create_file(uverbs_dev->dev, &dev_attr_abi_version))
		goto err_class;

	ib_set_client_data(device, &uverbs_client, uverbs_dev);

	return;

err_class:
	device_destroy(uverbs_class, uverbs_dev->cdev.dev);

err_cdev:
	cdev_del(&uverbs_dev->cdev);
	if (uverbs_dev->devnum < IB_UVERBS_MAX_DEVICES)
		clear_bit(devnum, dev_map);
	else
		clear_bit(devnum, overflow_map);

err:
	if (atomic_dec_and_test(&uverbs_dev->refcount))
		ib_uverbs_comp_dev(uverbs_dev);
	wait_for_completion(&uverbs_dev->comp);
	kobject_put(&uverbs_dev->kobj);
	return;
}

static void ib_uverbs_free_hw_resources(struct ib_uverbs_device *uverbs_dev,
					struct ib_device *ib_dev)
{
	struct ib_uverbs_file *file;
	struct ib_uverbs_event_file *event_file;
	struct ib_event event;

	/* Pending running commands to terminate */
	synchronize_srcu(&uverbs_dev->disassociate_srcu);
	event.event = IB_EVENT_DEVICE_FATAL;
	event.element.port_num = 0;
	event.device = ib_dev;

	mutex_lock(&uverbs_dev->lists_mutex);
	while (!list_empty(&uverbs_dev->uverbs_file_list)) {
		struct ib_ucontext *ucontext;

		file = list_first_entry(&uverbs_dev->uverbs_file_list,
					struct ib_uverbs_file, list);
		file->is_closed = 1;
		ucontext = file->ucontext;
		list_del(&file->list);
		file->ucontext = NULL;
		kref_get(&file->ref);
		mutex_unlock(&uverbs_dev->lists_mutex);
		/* We must release the mutex before going ahead and calling
		 * disassociate_ucontext. disassociate_ucontext might end up
		 * indirectly calling uverbs_close, for example due to freeing
		 * the resources (e.g mmput).
		 */
		ib_uverbs_event_handler(&file->event_handler, &event);
		if (ucontext) {
			ib_dev->disassociate_ucontext(ucontext);
			ib_uverbs_cleanup_ucontext(file, ucontext);
		}

		mutex_lock(&uverbs_dev->lists_mutex);
		kref_put(&file->ref, ib_uverbs_release_file);
	}

	while (!list_empty(&uverbs_dev->uverbs_events_file_list)) {
		event_file = list_first_entry(&uverbs_dev->
					      uverbs_events_file_list,
					      struct ib_uverbs_event_file,
					      list);
		spin_lock_irq(&event_file->lock);
		event_file->is_closed = 1;
		spin_unlock_irq(&event_file->lock);

		list_del(&event_file->list);
		if (event_file->is_async) {
			ib_unregister_event_handler(&event_file->uverbs_file->
						    event_handler);
			event_file->uverbs_file->event_handler.device = NULL;
		}

		wake_up_interruptible(&event_file->poll_wait);
		kill_fasync(&event_file->async_queue, SIGIO, POLL_IN);
	}
	mutex_unlock(&uverbs_dev->lists_mutex);
}

static void ib_uverbs_remove_one(struct ib_device *device, void *client_data)
{
	struct ib_uverbs_device *uverbs_dev = client_data;
	int wait_clients = 1;

	if (!uverbs_dev)
		return;

	dev_set_drvdata(uverbs_dev->dev, NULL);
	device_destroy(uverbs_class, uverbs_dev->cdev.dev);
	cdev_del(&uverbs_dev->cdev);

	if (uverbs_dev->devnum < IB_UVERBS_MAX_DEVICES)
		clear_bit(uverbs_dev->devnum, dev_map);
	else
		clear_bit(uverbs_dev->devnum - IB_UVERBS_MAX_DEVICES, overflow_map);

	if (device->disassociate_ucontext) {
		/* We disassociate HW resources and immediately return.
		 * Userspace will see a EIO errno for all future access.
		 * Upon returning, ib_device may be freed internally and is not
		 * valid any more.
		 * uverbs_device is still available until all clients close
		 * their files, then the uverbs device ref count will be zero
		 * and its resources will be freed.
		 * Note: At this point no more files can be opened since the
		 * cdev was deleted, however active clients can still issue
		 * commands and close their open files.
		 */
		rcu_assign_pointer(uverbs_dev->ib_dev, NULL);
		ib_uverbs_free_hw_resources(uverbs_dev, device);
		wait_clients = 0;
	}

	if (atomic_dec_and_test(&uverbs_dev->refcount))
		ib_uverbs_comp_dev(uverbs_dev);
	if (wait_clients)
		wait_for_completion(&uverbs_dev->comp);
	kobject_put(&uverbs_dev->kobj);
}

static char *uverbs_devnode(struct device *dev, umode_t *mode)
{
	if (mode)
		*mode = 0666;
	return kasprintf(GFP_KERNEL, "infiniband/%s", dev_name(dev));
}

static int __init ib_uverbs_init(void)
{
	int ret;

	ret = register_chrdev_region(IB_UVERBS_BASE_DEV, IB_UVERBS_MAX_DEVICES,
				     "infiniband_verbs");
	if (ret) {
		printk(KERN_ERR "user_verbs: couldn't register device number\n");
		goto out;
	}

	uverbs_class = class_create(THIS_MODULE, "infiniband_verbs");
	if (IS_ERR(uverbs_class)) {
		ret = PTR_ERR(uverbs_class);
		printk(KERN_ERR "user_verbs: couldn't create class infiniband_verbs\n");
		goto out_chrdev;
	}

	uverbs_class->devnode = uverbs_devnode;

	ret = class_create_file(uverbs_class, &class_attr_abi_version.attr);
	if (ret) {
		printk(KERN_ERR "user_verbs: couldn't create abi_version attribute\n");
		goto out_class;
	}

	ret = ib_register_client(&uverbs_client);
	if (ret) {
		printk(KERN_ERR "user_verbs: couldn't register client\n");
		goto out_class;
	}

	return 0;

out_class:
	class_destroy(uverbs_class);

out_chrdev:
	unregister_chrdev_region(IB_UVERBS_BASE_DEV, IB_UVERBS_MAX_DEVICES);

out:
	return ret;
}

static void __exit ib_uverbs_cleanup(void)
{
	ib_unregister_client(&uverbs_client);
	class_destroy(uverbs_class);
	unregister_chrdev_region(IB_UVERBS_BASE_DEV, IB_UVERBS_MAX_DEVICES);
	if (overflow_maj)
		unregister_chrdev_region(overflow_maj, IB_UVERBS_MAX_DEVICES);
	idr_destroy(&ib_uverbs_pd_idr);
	idr_destroy(&ib_uverbs_mr_idr);
	idr_destroy(&ib_uverbs_mw_idr);
	idr_destroy(&ib_uverbs_ah_idr);
	idr_destroy(&ib_uverbs_cq_idr);
	idr_destroy(&ib_uverbs_qp_idr);
	idr_destroy(&ib_uverbs_srq_idr);
}

module_init(ib_uverbs_init);
module_exit(ib_uverbs_cleanup);

redpajama_set_name: RedPajamaGithub


Making the right choice of lodging remains one of the most important concerns and aspects for a successful vacation. The Kata Beach resort has the best packages that offer great services ensuring amazing vacations.The Kata Beach resort provides access to beautiful accommodations at exquisite locations that cater all the expectations in wonderful ways. These resorts offer all the basic facilities like gorgeously designed rooms and suites, Wi-Fi connectivity, entertainment, fun activities, exclusive dining options etc managed with utmost care and commitment. The pools, spa centers and fun zones inside their premises have the capability of lightening up the day. Relax, refresh, rejuvenate and energize from the tiring and strenuous daily life. Become a fan of their high standard and professional hospitality and care. Spend some days at the Kata Beach resort amidst beautiful locations and enjoy the facilities, services, and experiences provided by these resorts to enjoy the vacation in every possible way.
The Kata Beach resort, Phuket provide some special services that ensure a lavish, grand and memorable stay for their guests. The Shore At Katathani resort has a beautiful infinity pool and offers yoga classes and aqua aerobics. Beyond Resort Kata provides an airport shuttle service for the feasibility of its customers. Katathani Phuket Beachfront Resort also provides an airport shuttle service and has the provision for activities from sports to cultural classes. Fitness and business centers have also been made available at many of these resorts for the convenience of the customers. Experience these special offers at the Kata Beach resort and feel delighted at the warm reception that they offer.
The facilities at the Kata Beach resort are worth paying attention to. Stay inside the fantastically designed rooms and suites of these resorts that stand up to the standards and expectations kept from them. All the resorts provide Wi-Fi connectivity, flat screen TVs, room service, mini bars etc. Parking facility is provided free of cost. Relax at the spa and massage centers available at most of the resorts. These resorts also have some amazing dining options to satisfy the foodie inside all travelers. The Shore At Katathani resort has a bi-level villa and its luxurious 1 or 2 bedroom villas also have private pools, sundecks, and separate living and dining areas. Katathani Phuket Beachfront Resort offers hot tubs and 24/7 room service for its guests. The well-managed facilities provided at the Kata Beach resorts suffice to please the hearts of their customers and meet out their expectations.
The Kata Beach resort offers some attractive and refined dining options that take care of the appetite of their guests while keeping both the quality and quantity in their minds. Beyond Resort Kata offers a free breakfast buffet. It has an airy café with wooden ceilings along with beach and poolside bars. The resort also offers cooking lessons. Katathani Phuket Beachfront Resort has 6 dining options and 6 bars including some open-air restaurants and an Italian eatery. The Shore At Katathani resort serves complimentary breakfast in a relaxed restaurant offering international cuisine. The highly skilled, trained and professional staff and management of the Kata Beach resort put in their best efforts to provide their customers with the best possible hospitality and services.
Q1. Do these resorts allow pets inside their premises?
A. Most of the resorts in this area are not pet-friendly. It is advised not to bring pets along without confirmation.
Q2. Is there breakfast buffet at any of these resorts?
A. Yes, some of the resorts do serve a breakfast buffet for their guests which is chargeable in a few cases.
Q3. Do we need to separately pay for the Wi-Fi services?
A. Many of these resorts do not charge for the Wi-Fi connectivity service separately.
Q4. Is the room service to be separately paid for?
A. No, room service is usually complimentary. It is still suggested to confirm before finalizing any of the resorts.
Q5. Do the resorts provide bike or car rentals?
A. Yes, some of these resorts do offer bike rentals.
Every Kata Beach resort is available as the ideal lodgings to stay during a vacation. Spend a few days of relaxation, enjoyment, comfort, pleasure, and luxury at these resorts that are maintained by a staff and management that is ever ready to serve the travelers for the best. Nearly all the refined resorts like The Shore At Katathani resort, Beyond Resort Kata, Katathani Phuket Beachfront Resort etc provides a wheelchair accessible entrance for the comfort of their customers. Come and live some memorable days of the vacation at the Kata Beach Resorts and transform them into the joys of a lifetime.
7 Enticing Places To Visit In Ayutthaya To Explore The Resurrected City!
The Kuramathi Island Resort: A Detailed Guide To An Enchanting Paradise!


Hi, my name is Bill Montgomery and I am the author of "Attacking Adversity." You can get your copy on Amazon.
This web site is a place where you can learn about upcoming books, personal appearances, courses based on attacking everything.
Ever since I studied Wing Chung Do I have looked at things from an offensive point of view. Maybe it even goes back to high school football where I played on offense. Whatever the origin I believe it is a solid way to go after anything in life.
Leave your email and I will be sure to let you know when a new book, course or information is available.
The only announcement for now is that the web site is continuously, slowly, very slowly being developed.
One of my favorite pastimes is hiking. This picture was taken on Mt. Rainier in the summer of 2016. At this time I was 71 years old. It is my hope to share some other hiking adventures here in the future.
Attacking Adversity is a resource for anyone going through difficult times. It draws on Mark Divine's Unbeatable Mind program and Eric Greitens book "Resilience." It is also an account of a difficult time in my life and what I learned from it.
Copyright © Bill Montgomery. All rights reserved.